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. If a method starts with a dash - it's a ___________. If it starts with a plus sign - it's a ______________.
Instance method; class method.
At runtime.
'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.'
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
2. Class methods are used for ___________ and the call starts with ____________.
Designated initializer.
Instance method; class method.
Creating objects - or finding information relative to the class. The name of the class is the first thing in the square brackets.
Points - to achieve device-independence
3. How many superviews does a view have? How many subviews?
One; zero to many
(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.
My rectangle in my superview's coordinate space
No - it gets the data from the controller.
4. How can I find out the class of any object? Give a line of code.
Class XX = [Object class]
No - it gets the data from the controller.
line up the colons!
Never!
5. A property is just the combination of _______.
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
Getter and setter methods.
A CGPoint and and a CGSize
6. What is the makeup of a CGPoint?
NSSet; no - it's immutable
Two CGFloats for x and y
Call setNeedsDisplay:
The runtime system asks the object what its class is.
7. The view is...
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
8. The single-view template in Xcode does not...
Override drawRect:
NSUserDefaults - which stores a property list.
create a model
Yes. The controller knows everything about the model.
9. ______ is a pointer
Strong. Object memory is freed at the end of the routine.
self
Other MVC trios.
internal origin and size. Use this inside a view
10. 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
11. How are local variables initialized in iOS 5?
Strong. Object memory is freed at the end of the routine.
To zero; so pointers are nil.
@synthesize; write our own getter and/or setter.
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.
12. What is at the top of the view hierarchy?
UIWindow
Action
line up the colons!
Other MVC trios.
13. What is used in lieu of pixels? And why?
Points - to achieve device-independence
NSNumber. For example numberWithDouble: and doubleValue:
At runtime.
Immutable. But there are many methods that take an NSString and returned a modified one. This is fast and preferable to using NSMutableString.
14. The decision on what method to call is made when?
NSNumber. For example numberWithDouble: and doubleValue:
Properties; instance variables
Points - to achieve device-independence
At runtime.
15. List the iOS hierarchy from top to bottom.
Other MVC trios.
Cocoa Touch - Media - Core Services - Core OS
(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.
On left side - is calling the setter - and on the right side - is calling the getter.
16. What does the controller do?
If it's in the header file - it's public. To make some private variables - you can put a private interface section at the top of an implementation file.
One; zero to many
Controls how the model is presented onscreen.
Yes. As much as it wants.
17. What about public/private in Objective-C?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
18. Some controllers have ____________ as their views.
Other MVC trios.
Strong. Object memory is freed at the end of the routine.
No - it gets the data from the controller.
NSDictionary; no - it's immutable.
19. What is the bounds property of a UIView?
internal origin and size. Use this inside a view
Override drawRect:
@synthesize; write our own getter and/or setter.
NSArray; no - it's immutable.
20. What is the iOS term for a library?
constant NSString
A framework.
A CGPoint and and a CGSize
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.
21. ________ is the .h file and __________ is the .m file.
NSUserDefaults - which stores a property list.
Interface; Implementation
iOS; when the view is loaded.
A CGPoint and and a CGSize
22. What is the makeup of a CGRect?
A CGPoint and and a CGSize
Can handle any language because it uses Unicode.
[Object isMemberOfClass:[Classname class]]
Properties; instance variables
23. Classes cannot have _________ or ___________.
Points - to achieve device-independence
Interface; Implementation
Two floats - for width and height
Properties; instance variables
24. ______ is a pointer to any object.
One; zero to many
Outlet; Action
id
Other MVC trios.
25. Show a private interface section.
Call setNeedsDisplay:
id
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
The document; possibly a database.
26. 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
27. You can send a message to a...
constant NSString
Immutable. But there are many methods that take an NSString and returned a modified one. This is fast and preferable to using NSMutableString.
Getter and setter methods.
A rectangular area
28. How can I save user information between launches of my app?
NSSet; no - it's immutable
NSUserDefaults - which stores a property list.
Right-click on view - or even a subview like a button.
[[UIView alloc] initWithFrame]
29. What do I use for an unordered collection - e.g. test for membership? And is it mutable?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
30. Where do I initialize properties?
NSLog; %@; %d and other formatters
MVC - for model-view-controller
[Object isKindOfClass:[Classname class]]
In the getter! This is called lazy instantiation.
31. ________ implements the getter and setter. But we can always__________
Immutable. But there are many methods that take an NSString and returned a modified one. This is fast and preferable to using NSMutableString.
@synthesize; write our own getter and/or setter.
A CGPoint and and a CGSize
'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.
32. Can the controller talking to the view?
for...in; don't change things inside the loop.
Yes. As much as it wants.
Import / handle multiple inclusion.
In the getter! This is called lazy instantiation.
33. 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
34. What is the name of a property in the controller that it uses to talk to views?
Call setNeedsDisplay:
An outlet.
Introspection - with the class method 'class'
[Class respondsToSelector:@selector(aMethod)]
35. The basic steps in custom drawing.
At runtime.
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.
1) Create a context 2) Create paths 3) Set colors - fonts - widths 4) Stroke or fill the above-created paths.
Points - to achieve device-independence
36. Dot notation does what?
Controls how the model is presented onscreen.
On left side - is calling the setter - and on the right side - is calling the getter.
Never!
zero/nil
37. How to see all actions - outlets - incoming/outgoing segues on a view?
Right-click on view - or even a subview like a button.
line up the colons!
Never!
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.
38. If I need to convert a number to an object - use __________
constant NSString
Outlet; Action
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
NSNumber. For example numberWithDouble: and doubleValue:
39. What about controller talking to the model?
1) Create a context 2) Create paths 3) Set colors - fonts - widths 4) Stroke or fill the above-created paths.
Argument validation.
Class XX = [Object class]
Yes. The controller knows everything about the model.
40. What is the center property of a UIView?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
41. What is in the model?
Instance method; class method.
Nothing happens - and nil is returned.
UIWindow
The document; possibly a database.
42. 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
43. Instance methods start with a ______ and class methods start with a ______.
(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.
NSNumber. For example numberWithDouble: and doubleValue:
Dash - Plus sign.
1) Create a context 2) Create paths 3) Set colors - fonts - widths 4) Stroke or fill the above-created paths.
44. What does 'weak' mean?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
45. What is a property list?
UIWindow
No. It's fine.
self
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
46. What to do in Xcode for short documentation? For full documentation?
option-click; option-double-click
Instance variable (ivar) or 'backing variable'
addSubview; removeFromSubview
NSObject
47. When happens when you send a message to nil?
Right-click on view - or even a subview like a button.
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
Nothing happens - and nil is returned.
At runtime.
48. What does 'strong' mean?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
49. Is NSArray mutable?
At runtime.
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.
No. Use NSMutableArray - which is a subclass of NSArray.
addSubview; removeFromSubview
50. A _______ is how a view notifies the controller of something - for example - a button press.
'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.'
Action
No...but it has 'a way' to notify the controller to come ask for fresh data.
NSLog; %@; %d and other formatters