SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
|
Email
Search
Test your basic knowledge |
iOS 5 App Development 2
Start Test
Study First
Subjects
:
it-skills
,
apple
Instructions:
Answer 50 questions in 15 minutes.
If you are not ready to take this test, you can
study here
.
Match each statement with the correct term.
Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.
This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. Objects in an array: are the pointed to strongly or weakly?
Strong. Object memory is freed at the end of the routine.
(1) We can validate (e.g. bounds-check) any sets done by a subclass. (2) We can lazily instantiate - so things only get created if and when they are needed.
Yes. The controller knows everything about the model.
Strongly.
2. In synthesize: @synthesize foo = _foo; The __foo_ is the ____________ or also known as the ___________________.
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
3. Where do I initialize properties?
On left side - is calling the setter - and on the right side - is calling the getter.
In the getter! This is called lazy instantiation.
Argument validation.
Call setNeedsDisplay:
4. What is the iOS term for a library?
Points - to achieve device-independence
(1) We can validate (e.g. bounds-check) any sets done by a subclass. (2) We can lazily instantiate - so things only get created if and when they are needed.
A framework.
create a model
5. What is the frame property of a UIView?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
6. The decision on what method to call is made when?
An outlet.
for...in; don't change things inside the loop.
At runtime.
Yes. As much as it wants.
7. In a nutshell: how to do custom drawing?
Two CGFloats for x and y
'Keep this in the heap until I don't point to anymore.' I won't point to it anymore if I set my pointer to nil - or if I am removed from the heap because no one points strongly to me.
Override drawRect:
One; zero to many
8. ______ is a pointer to any object.
Class XX = [Object class]
Center of the frame - which is in the superview's coordinate system
A rectangular area
id
9. What is an example of a reason to write a getter?
Center of the frame - which is in the superview's coordinate system
Lazy instantiation.
addSubview; removeFromSubview
line up the colons!
10. How to do enumeration with NSArray - NSDictionary - etc?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
11. The setters for outlets are called by _______ at this point ______________.
Wrap it in NSValue. And remember that NSValue immutable.
Right-click on view - or even a subview like a button.
iOS; when the view is loaded.
UIWindow
12. What about controller talking to the model?
Yes. The controller knows everything about the model.
addSubview; removeFromSubview
Never!
NSSet; no - it's immutable
13. Talk about NSString
Lazy instantiation.
Can handle any language because it uses Unicode.
A CGPoint and and a CGSize
NO is zero; YES is anything else.
14. If I need to convert a number to an object - use __________
NSNumber. For example numberWithDouble: and doubleValue:
Class XX = [Object class]
The document; possibly a database.
internal origin and size. Use this inside a view
15. How can I find out the class of any object? Give a line of code.
'Keep this in the heap as long as someone else points to it strongly. If it gets thrown out of the heap - set my pointer to it to nil.'
Immutable. But there are many methods that take an NSString and returned a modified one. This is fast and preferable to using NSMutableString.
Class XX = [Object class]
Never!
16. ______ is a pointer
self
Don't use id for a pointer. Use the actual type pointed to. It allows the compiler (but not the runtime!) to help find bugs.
NSObject
option-click; option-double-click
17. What is the word for checking/verifying the type of an object?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
18. What is the name of a property in the controller that it uses to talk to views?
Outlet; Action
Getter and setter methods.
An outlet.
Instance method; class method.
19. How are local variables initialized in iOS 5?
To zero; so pointers are nil.
The document; possibly a database.
id
'Keep this in the heap until I don't point to anymore.' I won't point to it anymore if I set my pointer to nil - or if I am removed from the heap because no one points strongly to me.
20. How can I save user information between launches of my app?
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
An outlet.
NSUserDefaults - which stores a property list.
Yes. The controller knows everything about the model.
21. How about the model talking to the controller?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
22. What is the makeup of a CGPoint?
Two CGFloats for x and y
NSNumber. For example numberWithDouble: and doubleValue:
Two floats - for width and height
My rectangle in my superview's coordinate space
23. A _______ is how a view notifies the controller of something - for example - a button press.
Action
Lazy instantiation.
NSData
Getter and setter methods.
24. In the initializer methods of objects I create - add what line of code? Why?
id
In the getter! This is called lazy instantiation.
One; zero to many
self = [super init] {if init is the designated initializer of the superclass}. If the superclass init routine fails - I will know to return nil from my init routine.
25. How to tell if an object is of a particular class? (Write a line of code)
A CGPoint and and a CGSize
A rectangular area
[Object isMemberOfClass:[Classname class]]
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
26. What is the base class for most objects in the iOS SDK?
Never!
NSObject
The document; possibly a database.
self
27. What does the controller do?
Controls how the model is presented onscreen.
iOS; when the view is loaded.
NSLog; %@; %d and other formatters
Getter and setter methods.
28. What is used in lieu of pixels? And why?
Import / handle multiple inclusion.
Points - to achieve device-independence
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
A CGPoint and and a CGSize
29. What does 'strong' mean?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
30. Why are properties good?
No. Use NSMutableArray - which is a subclass of NSArray.
Class XX = [Object class]
Points - to achieve device-independence
(1) We can validate (e.g. bounds-check) any sets done by a subclass. (2) We can lazily instantiate - so things only get created if and when they are needed.
31. How to create a UIView in code?
[[UIView alloc] initWithFrame]
Controls how the model is presented onscreen.
@synthesize; write our own getter and/or setter.
The document; possibly a database.
32. Class methods are used for ___________ and the call starts with ____________.
Creating objects - or finding information relative to the class. The name of the class is the first thing in the square brackets.
NO is zero; YES is anything else.
Instance method; class method.
Right-click on view - or even a subview like a button.
33. What is the makeup of a CGRect?
The runtime system asks the object what its class is.
A CGPoint and and a CGSize
NO is zero; YES is anything else.
Properties; instance variables
34. How many superviews does a view have? How many subviews?
NSLog; %@; %d and other formatters
Sort of - in ways that it doesn't need to know much about the controller. For example: delegation.
Never!
One; zero to many
35. Are local pointers to objects strong or weak? So what happens at the end of the routine?
A rectangular area
No. Use NSMutableArray - which is a subclass of NSArray.
internal origin and size. Use this inside a view
Strong. Object memory is freed at the end of the routine.
36. A _______ goes from the Controller to the View. A ________ goes from the view to the controller.
option-click; option-double-click
Getter and setter methods.
Outlet; Action
Two CGFloats for x and y
37. When is it OK to call drawRect: directly?
Never!
Class XX = [Object class]
Properties; instance variables
Yes. As much as it wants.
38. Remember that it's cool to...
internal origin and size. Use this inside a view
line up the colons!
NSNumber. For example numberWithDouble: and doubleValue:
Strongly.
39. Instead of 'include' statements - in Objective-C we use _______ which does ________
Can handle any language because it uses Unicode.
[[UIView alloc] initWithFrame]
The runtime system asks the object what its class is.
Import / handle multiple inclusion.
40. When happens when you send a message to nil?
NSObject
Lazy instantiation.
Can handle any language because it uses Unicode.
Nothing happens - and nil is returned.
41. How to tell whether an object implements a particular method? (A line of code)
[Class respondsToSelector:@selector(aMethod)]
Never!
[Object isMemberOfClass:[Classname class]]
the controller's minions. Gets things to the screen.
42. What about the model and the view talking to one another?
for...in; don't change things inside the loop.
Call setNeedsDisplay:
Never!
[Object isKindOfClass:[Classname class]]
43. What is static typing? Why is it good?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
44. ________ implements the getter and setter. But we can always__________
@synthesize; write our own getter and/or setter.
Nothing happens - and nil is returned.
NSSet; no - it's immutable
Other MVC trios.
45. Some controllers have ____________ as their views.
Other MVC trios.
[Object isMemberOfClass:[Classname class]]
option-click; option-double-click
Nothing happens - and nil is returned.
46. How to see all actions - outlets - incoming/outgoing segues on a view?
Properties; instance variables
Right-click on view - or even a subview like a button.
Instance method; class method.
In the getter! This is called lazy instantiation.
47. What do I use for an ordered collection of objects? And is it mutable?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
48. What to do in Xcode for short documentation? For full documentation?
[Object isMemberOfClass:[Classname class]]
Instance method; class method.
Argument validation.
option-click; option-double-click
49. Talk about BOOL variables.
Points - to achieve device-independence
NO is zero; YES is anything else.
NSObject
the controller's minions. Gets things to the screen.
50. Calling a method on id works just fine because....?
internal origin and size. Use this inside a view
Strong. Object memory is freed at the end of the routine.
The runtime system asks the object what its class is.
UIWindow
Sorry!:) No result found.
Can you answer 50 questions in 15 minutes?
Let me suggest you:
Browse all subjects
Browse all tests
Most popular tests
Major Subjects
Tests & Exams
AP
CLEP
DSST
GRE
SAT
GMAT
Certifications
CISSP go to https://www.isc2.org/
PMP
ITIL
RHCE
MCTS
More...
IT Skills
Android Programming
Data Modeling
Objective C Programming
Basic Python Programming
Adobe Illustrator
More...
Business Skills
Advertising Techniques
Business Accounting Basics
Business Strategy
Human Resource Management
Marketing Basics
More...
Soft Skills
Body Language
People Skills
Public Speaking
Persuasion
Job Hunting And Resumes
More...
Vocabulary
GRE Vocab
SAT Vocab
TOEFL Essential Vocab
Basic English Words For All
Global Words You Should Know
Business English
More...
Languages
AP German Vocab
AP Latin Vocab
SAT Subject Test: French
Italian Survival
Norwegian Survival
More...
Engineering
Audio Engineering
Computer Science Engineering
Aerospace Engineering
Chemical Engineering
Structural Engineering
More...
Health Sciences
Basic Nursing Skills
Health Science Language Fundamentals
Veterinary Technology Medical Language
Cardiology
Clinical Surgery
More...
English
Grammar Fundamentals
Literary And Rhetorical Vocab
Elements Of Style Vocab
Introduction To English Major
Complete Advanced Sentences
Literature
Homonyms
More...
Math
Algebra Formulas
Basic Arithmetic: Measurements
Metric Conversions
Geometric Properties
Important Math Facts
Number Sense Vocab
Business Math
More...
Other Major Subjects
Science
Economics
History
Law
Performing-arts
Cooking
Logic & Reasoning
Trivia
Browse all subjects
Browse all tests
Most popular tests