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. What is the makeup of a CGPoint?
addSubview; removeFromSubview
The document; possibly a database.
Two CGFloats for x and y
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
2. The view is...
3. What is the word for checking/verifying the type of an object?
4. What is used in lieu of pixels? And why?
A CGPoint and and a CGSize
No. It's fine.
UIWindow
Points - to achieve device-independence
5. How to create a UIView in code?
NSArray; no - it's immutable.
[[UIView alloc] initWithFrame]
Strong. Object memory is freed at the end of the routine.
id
6. All classes should have a __________________ to be called by subclasses.
Getter and setter methods.
Dash - Plus sign.
Designated initializer.
No. It's fine.
7. ______ is a pointer
Action
A CGPoint and and a CGSize
The runtime system asks the object what its class is.
self
8. When happens when you send a message to nil?
'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.
Dash - Plus sign.
the controller's minions. Gets things to the screen.
Nothing happens - and nil is returned.
9. What do I use for a bag of bits?
Lazy instantiation.
NSData
Strong. Object memory is freed at the end of the routine.
the controller's minions. Gets things to the screen.
10. If I need to convert a number to an object - use __________
MVC - for model-view-controller
Getter and setter methods.
An outlet.
NSNumber. For example numberWithDouble: and doubleValue:
11. What is in the model?
[Class respondsToSelector:@selector(aMethod)]
Import / handle multiple inclusion.
Action
The document; possibly a database.
12. What is the makeup of a CGRect?
A CGPoint and and a CGSize
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
Other MVC trios.
NSNumber. For example numberWithDouble: and doubleValue:
13. In synthesize: @synthesize foo = _foo; The __foo_ is the ____________ or also known as the ___________________.
14. What does 'strong' mean?
15. What do I use for an unordered collection - e.g. test for membership? And is it mutable?
16. You can send a message to a...
constant NSString
Wrap it in NSValue. And remember that NSValue immutable.
addSubview; removeFromSubview
My rectangle in my superview's coordinate space
17. Dot notation does what?
internal origin and size. Use this inside a view
[Class respondsToSelector:@selector(aMethod)]
[[UIView alloc] initWithFrame]
On left side - is calling the setter - and on the right side - is calling the getter.
18. What about the model and the view talking to one another?
UIViewController.
Never!
NSObject
No...but it has 'a way' to notify the controller to come ask for fresh data.
19. What to do in Xcode for short documentation? For full documentation?
Interface; Implementation
option-click; option-double-click
Strong. Object memory is freed at the end of the routine.
Dash - Plus sign.
20. What about public/private in Objective-C?
21. How to tell if an object is of a particular class? (Write a line of code)
NSObject
[Object isMemberOfClass:[Classname class]]
internal origin and size. Use this inside a view
addSubview; removeFromSubview
22. When is it OK to call drawRect: directly?
iOS; when the view is loaded.
Class XX = [Object class]
Never!
1) Create a context 2) Create paths 3) Set colors - fonts - widths 4) Stroke or fill the above-created paths.
23. What is a property list?
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
Points - to achieve device-independence
Interface; Implementation
NSUserDefaults - which stores a property list.
24. How can I find out the class of any object? Give a line of code.
Two floats - for width and height
Designated initializer.
Creating objects - or finding information relative to the class. The name of the class is the first thing in the square brackets.
Class XX = [Object class]
25. The controller is always a subclass of...?
MVC - for model-view-controller
Strong. Object memory is freed at the end of the routine.
UIViewController.
id; an object pointer
26. Instead of 'include' statements - in Objective-C we use _______ which does ________
Import / handle multiple inclusion.
MVC - for model-view-controller
[[UIView alloc] initWithFrame]
self.view
27. What is the center property of a UIView?
28. Can the controller talking to the view?
Yes. As much as it wants.
1.) Ask another object to do it - e.g. with mutableCopy. 2.) Call a class method - 3.) [[Classname alloc] init];
Instance variable (ivar) or 'backing variable'
My rectangle in my superview's coordinate space
29. Talk about BOOL variables.
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
Center of the frame - which is in the superview's coordinate system
NO is zero; YES is anything else.
Yes. As much as it wants.
30. List the iOS hierarchy from top to bottom.
Immutable. But there are many methods that take an NSString and returned a modified one. This is fast and preferable to using NSMutableString.
Cocoa Touch - Media - Core Services - Core OS
option-click; option-double-click
NSUserDefaults - which stores a property list.
31. Classes cannot have _________ or ___________.
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
Call setNeedsDisplay:
Properties; instance variables
On left side - is calling the setter - and on the right side - is calling the getter.
32. What is at the top of the view hierarchy?
Argument validation.
In the getter! This is called lazy instantiation.
UIWindow
A framework.
33. Some controllers have ____________ as their views.
Center of the frame - which is in the superview's coordinate system
NSArray; no - it's immutable.
Other MVC trios.
No - it gets the data from the controller.
34. Why are properties good?
Immutable. But there are many methods that take an NSString and returned a modified one. This is fast and preferable to using NSMutableString.
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.
Center of the frame - which is in the superview's coordinate system
(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.
35. How to add subviews in code? How to remove them?
1) Create a context 2) Create paths 3) Set colors - fonts - widths 4) Stroke or fill the above-created paths.
On left side - is calling the setter - and on the right side - is calling the getter.
addSubview; removeFromSubview
No. Use NSMutableArray - which is a subclass of NSArray.
36. Talk about NSString
Interface; Implementation
the controller's minions. Gets things to the screen.
Other MVC trios.
Can handle any language because it uses Unicode.
37. Is NSString mutable or not?
NSDictionary; no - it's immutable.
Right-click on view - or even a subview like a button.
Immutable. But there are many methods that take an NSString and returned a modified one. This is fast and preferable to using NSMutableString.
Two floats - for width and height
38. How many superviews does a view have? How many subviews?
NSUserDefaults - which stores a property list.
[[UIView alloc] initWithFrame]
Call setNeedsDisplay:
One; zero to many
39. What does 'weak' mean?
40. Calling a method on id works just fine because....?
Strongly.
iOS; when the view is loaded.
The runtime system asks the object what its class is.
Wrap it in NSValue. And remember that NSValue immutable.
41. The single-view template in Xcode does not...
create a model
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
Instance variable (ivar) or 'backing variable'
Designated initializer.
42. A property is just the combination of _______.
Getter and setter methods.
Sort of - in ways that it doesn't need to know much about the controller. For example: delegation.
Immutable. But there are many methods that take an NSString and returned a modified one. This is fast and preferable to using NSMutableString.
UIWindow
43. What about the view talking to the controller?
44. What about controller talking to the model?
Yes. The controller knows everything about the model.
Instance variable (ivar) or 'backing variable'
Lazy instantiation.
NSObject
45. Where do I initialize properties?
In the getter! This is called lazy instantiation.
internal origin and size. Use this inside a view
The document; possibly a database.
At runtime.
46. The decision on what method to call is made when?
An outlet.
The document; possibly a database.
zero/nil
At runtime.
47. How to do enumeration with NSArray - NSDictionary - etc?
48. How to see all actions - outlets - incoming/outgoing segues on a view?
Wrap it in NSValue. And remember that NSValue immutable.
Right-click on view - or even a subview like a button.
Instance method; class method.
Designated initializer.
49. Objects in an array: are the pointed to strongly or weakly?
Strongly.
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.
Center of the frame - which is in the superview's coordinate system
zero/nil
50. How can I save user information between launches of my app?
NSUserDefaults - which stores a property list.
Immutable. But there are many methods that take an NSString and returned a modified one. This is fast and preferable to using NSMutableString.
Other MVC trios.
Argument validation.