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. The controller is always a subclass of...?
No...but it has 'a way' to notify the controller to come ask for fresh data.
Immutable. But there are many methods that take an NSString and returned a modified one. This is fast and preferable to using NSMutableString.
Introspection - with the class method 'class'
UIViewController.
2. ________ is the .h file and __________ is the .m file.
Controls how the model is presented onscreen.
Can handle any language because it uses Unicode.
Interface; Implementation
Properties; instance variables
3. ______ is a pointer to any object.
Controls how the model is presented onscreen.
NO is zero; YES is anything else.
id
self
4. Remember that it's cool to...
Cocoa Touch - Media - Core Services - Core OS
Import / handle multiple inclusion.
line up the colons!
1) Create a context 2) Create paths 3) Set colors - fonts - widths 4) Stroke or fill the above-created paths.
5. Talk about NSString
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.
Can handle any language because it uses Unicode.
@synthesize; write our own getter and/or setter.
Strongly.
6. How many superviews does a view have? How many subviews?
One; zero to many
Points - to achieve device-independence
id
Properties; instance variables
7. What is a property list?
NSObject
A rectangular area
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
Yes. The controller knows everything about the model.
8. Is NSString mutable or not?
Right-click on view - or even a subview like a button.
line up the colons!
My rectangle in my superview's coordinate space
Immutable. But there are many methods that take an NSString and returned a modified one. This is fast and preferable to using NSMutableString.
9. Use ______ to send debugging messages to the console. Use _____ for any object - which should return an string. Can also use ______.
zero/nil
NSLog; %@; %d and other formatters
Instance method; class method.
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
10. What is the iOS term for a library?
[Object isKindOfClass:[Classname class]]
One; zero to many
NSSet; no - it's immutable
A framework.
11. A _______ goes from the Controller to the View. A ________ goes from the view to the controller.
Class XX = [Object class]
On left side - is calling the setter - and on the right side - is calling the getter.
No...but it has 'a way' to notify the controller to come ask for fresh data.
Outlet; Action
12. What do I use for an ordered collection of objects? And is it mutable?
13. What is the name of a property in the controller that it uses to talk to views?
An outlet.
Never!
A framework.
Two CGFloats for x and y
14. How to force a redraw of a custom area?
UIViewController.
Getter and setter methods.
Instance method; class method.
Call setNeedsDisplay:
15. What is the makeup of a CGSize?
Two floats - for width and height
Creating objects - or finding information relative to the class. The name of the class is the first thing in the square brackets.
@synthesize; write our own getter and/or setter.
Nothing happens - and nil is returned.
16. How to tell if an object is of a particular class? (Write a line of code)
[Object isMemberOfClass:[Classname class]]
'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.
MVC - for model-view-controller
id; an object pointer
17. How to see all actions - outlets - incoming/outgoing segues on a view?
The compiler adds code to count references.
Right-click on view - or even a subview like a button.
id; an object pointer
[[UIView alloc] initWithFrame]
18. There is no difference between _____ and _______ at runtime.
option-click; option-double-click
NSSet; no - it's immutable
id; an object pointer
Interface; Implementation
19. Objects in an array: are the pointed to strongly or weakly?
Yes. The controller knows everything about the model.
MVC - for model-view-controller
Strongly.
UIViewController.
20. What is the word for checking/verifying the type of an object?
21. What to do in Xcode for short documentation? For full documentation?
Designated initializer.
NSSet; no - it's immutable
UIViewController.
option-click; option-double-click
22. When happens when you send a message to nil?
Two floats - for width and height
Two CGFloats for x and y
Nothing happens - and nil is returned.
id
23. In synthesize: @synthesize foo = _foo; The __foo_ is the ____________ or also known as the ___________________.
24. What is the makeup of a CGRect?
Never!
[Class respondsToSelector:@selector(aMethod)]
self
A CGPoint and and a CGSize
25. The single-view template in Xcode does not...
The compiler adds code to count references.
Strong. Object memory is freed at the end of the routine.
create a model
Points - to achieve device-independence
26. You can send a message to a...
Can handle any language because it uses Unicode.
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
constant NSString
[Object isMemberOfClass:[Classname class]]
27. Class methods are used for ___________ and the call starts with ____________.
Controls how the model is presented onscreen.
Creating objects - or finding information relative to the class. The name of the class is the first thing in the square brackets.
The compiler adds code to count references.
internal origin and size. Use this inside a view
28. What if I want to put a scalar into an NSArray or NSSet?
A CGPoint and and a CGSize
Introspection - with the class method 'class'
Wrap it in NSValue. And remember that NSValue immutable.
1) Create a context 2) Create paths 3) Set colors - fonts - widths 4) Stroke or fill the above-created paths.
29. What does a view (UIView) represent?
Interface; Implementation
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
In the getter! This is called lazy instantiation.
A rectangular area
30. What is the center property of a UIView?
31. How can I find out the class of any object? Give a line of code.
Class XX = [Object class]
[Object isMemberOfClass:[Classname class]]
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
'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.'
32. Some controllers have ____________ as their views.
Instance method; class method.
@synthesize; write our own getter and/or setter.
Other MVC trios.
Two CGFloats for x and y
33. Dot notation does what?
Yes. The controller knows everything about the model.
Controls how the model is presented onscreen.
On left side - is calling the setter - and on the right side - is calling the getter.
Argument validation.
34. If a method starts with a dash - it's a ___________. If it starts with a plus sign - it's a ______________.
Instance method; class method.
My rectangle in my superview's coordinate space
Strongly.
for...in; don't change things inside the loop.
35. If I need to convert a number to an object - use __________
NSNumber. For example numberWithDouble: and doubleValue:
iOS; when the view is loaded.
zero/nil
NSUserDefaults - which stores a property list.
36. Is NSArray mutable?
No. Use NSMutableArray - which is a subclass of NSArray.
[Object isKindOfClass:[Classname class]]
Override drawRect:
No. It's fine.
37. The view is...
38. 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.'
for...in; don't change things inside the loop.
Action
line up the colons!
39. How to create a UIView in code?
Instance method; class method.
A CGPoint and and a CGSize
[[UIView alloc] initWithFrame]
Cocoa Touch - Media - Core Services - Core OS
40. What does 'strong' mean?
41. When is it OK to call drawRect: directly?
[Object isKindOfClass:[Classname class]]
Instance method; class method.
Other MVC trios.
Never!
42. How to add subviews in code? How to remove them?
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
Two CGFloats for x and y
One; zero to many
addSubview; removeFromSubview
43. Does a view 'own' the data it displays?
No...but it has 'a way' to notify the controller to come ask for fresh data.
No - it gets the data from the controller.
No. It's fine.
internal origin and size. Use this inside a view
44. All classes should have a __________________ to be called by subclasses.
NSObject
NSArray; no - it's immutable.
Designated initializer.
Lazy instantiation.
45. The basic steps in custom drawing.
No - it gets the data from the controller.
1) Create a context 2) Create paths 3) Set colors - fonts - widths 4) Stroke or fill the above-created paths.
Controls how the model is presented onscreen.
zero/nil
46. What is the frame property of a UIView?
47. 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.
Strongly.
iOS; when the view is loaded.
Call setNeedsDisplay:
48. What is a reason to write our own setter?
Argument validation.
id
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
A framework.
49. What is the makeup of a CGPoint?
Never!
Two CGFloats for x and y
id
Right-click on view - or even a subview like a button.
50. How to instantiate an object?
1.) Ask another object to do it - e.g. with mutableCopy. 2.) Call a class method - 3.) [[Classname alloc] init];
NSData
On left side - is calling the setter - and on the right side - is calling the getter.
Call setNeedsDisplay: