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. Instance methods start with a ______ and class methods start with a ______.
option-click; option-double-click
Dash - Plus sign.
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
NSData
2. Objects in an array: are the pointed to strongly or weakly?
Strongly.
Center of the frame - which is in the superview's coordinate system
A framework.
Two floats - for width and height
3. All classes should have a __________________ to be called by subclasses.
The runtime system asks the object what its class is.
Designated initializer.
Right-click on view - or even a subview like a button.
Creating objects - or finding information relative to the class. The name of the class is the first thing in the square brackets.
4. In the initializer methods of objects I create - add what line of code? Why?
self.view
NSObject
self
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.
5. What is an example of a reason to write a getter?
Lazy instantiation.
NSSet; no - it's immutable
constant NSString
[Class respondsToSelector:@selector(aMethod)]
6. A _______ goes from the Controller to the View. A ________ goes from the view to the controller.
One; zero to many
Yes. The controller knows everything about the model.
Outlet; Action
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.
7. Classes cannot have _________ or ___________.
internal origin and size. Use this inside a view
NO is zero; YES is anything else.
id; an object pointer
Properties; instance variables
8. The view is...
9. How about the model talking to the controller?
10. When is it OK to call drawRect: directly?
Never!
NSLog; %@; %d and other formatters
[Object isKindOfClass:[Classname class]]
NO is zero; YES is anything else.
11. The decision on what method to call is made when?
Yes. The controller knows everything about the model.
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
At runtime.
NSNumber. For example numberWithDouble: and doubleValue:
12. What is the iOS term for a library?
A CGPoint and and a CGSize
Wrap it in NSValue. And remember that NSValue immutable.
internal origin and size. Use this inside a view
A framework.
13. What does 'strong' mean?
14. A property is just the combination of _______.
line up the colons!
id
create a model
Getter and setter methods.
15. Why are properties good?
(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.
NSObject
[[UIView alloc] initWithFrame]
Strongly.
16. All properties are initialized to _____
UIViewController.
At runtime.
Never!
zero/nil
17. What is a property list?
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
Instance method; class method.
[Class respondsToSelector:@selector(aMethod)]
No. It's fine.
18. When happens when you send a message to nil?
Cocoa Touch - Media - Core Services - Core OS
Nothing happens - and nil is returned.
option-click; option-double-click
Call setNeedsDisplay:
19. If a method starts with a dash - it's a ___________. If it starts with a plus sign - it's a ______________.
Properties; instance variables
Instance method; class method.
[Object isMemberOfClass:[Classname class]]
Dash - Plus sign.
20. What is the bounds property of a UIView?
(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.
UIWindow
Yes. The controller knows everything about the model.
internal origin and size. Use this inside a view
21. What about the model and the view talking to one another?
The runtime system asks the object what its class is.
No. It's fine.
Properties; instance variables
Never!
22. Instead of 'include' statements - in Objective-C we use _______ which does ________
No. It's fine.
In the getter! This is called lazy instantiation.
Import / handle multiple inclusion.
Other MVC trios.
23. What does 'weak' mean?
24. What is used in lieu of pixels? And why?
Points - to achieve device-independence
NSSet; no - it's immutable
One; zero to many
Two floats - for width and height
25. What is the word for checking/verifying the type of an object?
26. What is the center property of a UIView?
27. The controller is always a subclass of...?
id; an object pointer
Yes. As much as it wants.
Lazy instantiation.
UIViewController.
28. There is no difference between _____ and _______ at runtime.
Right-click on view - or even a subview like a button.
Import / handle multiple inclusion.
Argument validation.
id; an object pointer
29. What is the makeup of a CGPoint?
Call setNeedsDisplay:
Two CGFloats for x and y
Getter and setter methods.
Points - to achieve device-independence
30. Show a private interface section.
[Object isMemberOfClass:[Classname class]]
Center of the frame - which is in the superview's coordinate system
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
Class XX = [Object class]
31. How to tell if an object is of a particular class? (Write a line of code)
NSDictionary; no - it's immutable.
A rectangular area
[Object isMemberOfClass:[Classname class]]
Argument validation.
32. What do I use for a bag of bits?
NSData
To zero; so pointers are nil.
Nothing happens - and nil is returned.
Dash - Plus sign.
33. What do I use for an unordered collection - e.g. test for membership? And is it mutable?
34. How are local variables initialized in iOS 5?
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.
To zero; so pointers are nil.
A framework.
UIWindow
35. What do I use for a hash table/associative array? And is it mutable?
36. Dot notation does what?
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
create a model
On left side - is calling the setter - and on the right side - is calling the getter.
'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.
37. How to see all actions - outlets - incoming/outgoing segues on a view?
Right-click on view - or even a subview like a button.
NO is zero; YES is anything else.
[Class respondsToSelector:@selector(aMethod)]
[[UIView alloc] initWithFrame]
38. Is NSString mutable or not?
Immutable. But there are many methods that take an NSString and returned a modified one. This is fast and preferable to using NSMutableString.
Points - to achieve device-independence
UIViewController.
Nothing happens - and nil is returned.
39. ______ is a pointer
[Object isMemberOfClass:[Classname class]]
The compiler adds code to count references.
self
Creating objects - or finding information relative to the class. The name of the class is the first thing in the square brackets.
40. What does the controller do?
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
Argument validation.
Other MVC trios.
Controls how the model is presented onscreen.
41. What do I use for an ordered collection of objects? And is it mutable?
42. A _______ is how a view notifies the controller of something - for example - a button press.
Action
On left side - is calling the setter - and on the right side - is calling the getter.
(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.
Properties; instance variables
43. You can send a message to a...
id; an object pointer
constant NSString
An outlet.
UIViewController.
44. What is the fundamental design pattern of iOS development?
Interface; Implementation
for...in; don't change things inside the loop.
No. Use NSMutableArray - which is a subclass of NSArray.
MVC - for model-view-controller
45. What about the view talking to the controller?
46. Remember that it's cool to...
Points - to achieve device-independence
line up the colons!
1.) Ask another object to do it - e.g. with mutableCopy. 2.) Call a class method - 3.) [[Classname alloc] init];
No. Use NSMutableArray - which is a subclass of NSArray.
47. ________ implements the getter and setter. But we can always__________
MVC - for model-view-controller
@synthesize; write our own getter and/or setter.
To zero; so pointers are nil.
for...in; don't change things inside the loop.
48. Some controllers have ____________ as their views.
self
Two floats - for width and height
Other MVC trios.
NSData
49. How to tell whether an object is of a class or class that inherits from that class? (Write a line of code)
NSArray; no - it's immutable.
internal origin and size. Use this inside a view
[Object isKindOfClass:[Classname class]]
Two floats - for width and height
50. In synthesize: @synthesize foo = _foo; The __foo_ is the ____________ or also known as the ___________________.