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. 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.
self.view
Two floats - for width and height
NSData
2. What is the word for checking/verifying the type of an object?
3. Can the controller talking to the view?
Yes. As much as it wants.
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
One; zero to many
id
4. What is used in lieu of pixels? And why?
Points - to achieve device-independence
Lazy instantiation.
Other MVC trios.
My rectangle in my superview's coordinate space
5. What is the bounds property of a UIView?
Two floats - for width and height
the controller's minions. Gets things to the screen.
internal origin and size. Use this inside a view
[Object isKindOfClass:[Classname class]]
6. What do I use for a bag of bits?
id
Points - to achieve device-independence
NSData
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. You can send a message to a...
To zero; so pointers are nil.
constant NSString
[Object isKindOfClass:[Classname class]]
id
8. How to force a redraw of a custom area?
Call setNeedsDisplay:
@synthesize; write our own getter and/or setter.
No. Use NSMutableArray - which is a subclass of NSArray.
internal origin and size. Use this inside a view
9. Where do I initialize properties?
Introspection - with the class method 'class'
A framework.
A CGPoint and and a CGSize
In the getter! This is called lazy instantiation.
10. How is ARC done?
The compiler adds code to count references.
Right-click on view - or even a subview like a button.
Action
NSObject
11. How many superviews does a view have? How many subviews?
Lazy instantiation.
NSNumber. For example numberWithDouble: and doubleValue:
Two CGFloats for x and y
One; zero to many
12. Show a private interface section.
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.
Strongly.
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
id; an object pointer
13. How about the model talking to the controller?
14. A _______ goes from the Controller to the View. A ________ goes from the view to the controller.
Controls how the model is presented onscreen.
NSDictionary; no - it's immutable.
The runtime system asks the object what its class is.
Outlet; Action
15. What to do in Xcode for short documentation? For full documentation?
Outlet; Action
option-click; option-double-click
NSDictionary; no - it's immutable.
Interface; Implementation
16. When happens when you send a message to nil?
Nothing happens - and nil is returned.
@synthesize; write our own getter and/or setter.
Strong. Object memory is freed at the end of the routine.
NSLog; %@; %d and other formatters
17. ________ implements the getter and setter. But we can always__________
the controller's minions. Gets things to the screen.
Instance variable (ivar) or 'backing variable'
@synthesize; write our own getter and/or setter.
NSDictionary; no - it's immutable.
18. What is static typing? Why is it good?
19. If I need to convert a number to an object - use __________
Wrap it in NSValue. And remember that NSValue immutable.
[Object isKindOfClass:[Classname class]]
NSNumber. For example numberWithDouble: and doubleValue:
self.view
20. The view is...
21. How can I save user information between launches of my app?
addSubview; removeFromSubview
NSUserDefaults - which stores a property list.
Cocoa Touch - Media - Core Services - Core OS
NSObject
22. What if I want to put a scalar into an NSArray or NSSet?
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.
create a model
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.
Wrap it in NSValue. And remember that NSValue immutable.
23. What does the controller do?
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
Designated initializer.
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.
24. What is the frame property of a UIView?
25. What is a reason to write our own setter?
NSArray; no - it's immutable.
id; an object pointer
Argument validation.
Never!
26. Talk about BOOL variables.
NO is zero; YES is anything else.
Strongly.
Introspection - with the class method 'class'
Dash - Plus sign.
27. What about the view talking to the controller?
28. What does 'weak' mean?
29. What is the center property of a UIView?
30. What does a view (UIView) represent?
id; an object pointer
A rectangular area
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.
Creating objects - or finding information relative to the class. The name of the class is the first thing in the square brackets.
31. How can I find out the class of any object? Give a line of code.
Designated initializer.
Wrap it in NSValue. And remember that NSValue immutable.
Instance method; class method.
Class XX = [Object class]
32. All classes should have a __________________ to be called by subclasses.
[Object isKindOfClass:[Classname class]]
Designated initializer.
NSNumber. For example numberWithDouble: and doubleValue:
1.) Ask another object to do it - e.g. with mutableCopy. 2.) Call a class method - 3.) [[Classname alloc] init];
33. What is the base class for most objects in the iOS SDK?
Call setNeedsDisplay:
MVC - for model-view-controller
NSObject
No...but it has 'a way' to notify the controller to come ask for fresh data.
34. How to create a UIView in code?
No. Use NSMutableArray - which is a subclass of NSArray.
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.
[[UIView alloc] initWithFrame]
NSArray; no - it's immutable.
35. Remember that it's cool to...
line up the colons!
NSDictionary; no - it's immutable.
the controller's minions. Gets things to the screen.
Action
36. How to tell if an object is of a particular class? (Write a line of code)
addSubview; removeFromSubview
Instance variable (ivar) or 'backing variable'
[Object isMemberOfClass:[Classname class]]
Action
37. Objects in an array: are the pointed to strongly or weakly?
An outlet.
constant NSString
line up the colons!
Strongly.
38. What is the name of a property in the controller that it uses to talk to views?
No. Use NSMutableArray - which is a subclass of NSArray.
Instance variable (ivar) or 'backing variable'
iOS; when the view is loaded.
An outlet.
39. How to tell whether an object implements a particular method? (A line of code)
[Class respondsToSelector:@selector(aMethod)]
Strong. Object memory is freed at the end of the routine.
Cocoa Touch - Media - Core Services - Core OS
NO is zero; YES is anything else.
40. Instance methods start with a ______ and class methods start with a ______.
1) Create a context 2) Create paths 3) Set colors - fonts - widths 4) Stroke or fill the above-created paths.
Dash - Plus sign.
An outlet.
In the getter! This is called lazy instantiation.
41. What is a property list?
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.
Sort of - in ways that it doesn't need to know much about the controller. For example: delegation.
UIViewController.
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
42. What do I use for a hash table/associative array? And is it mutable?
43. What is the makeup of a CGRect?
NO is zero; YES is anything else.
No...but it has 'a way' to notify the controller to come ask for fresh data.
The document; possibly a database.
A CGPoint and and a CGSize
44. The controller is always a subclass of...?
UIViewController.
To zero; so pointers are nil.
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
An outlet.
45. All properties are initialized to _____
Interface; Implementation
Center of the frame - which is in the superview's coordinate system
The compiler adds code to count references.
zero/nil
46. In synthesize: @synthesize foo = _foo; The __foo_ is the ____________ or also known as the ___________________.
47. Does a view 'own' the data it displays?
NSDictionary; no - it's immutable.
No - it gets the data from the controller.
Lazy instantiation.
UIViewController.
48. When is it OK to call drawRect: directly?
zero/nil
Interface; Implementation
id
Never!
49. Dot notation does what?
On left side - is calling the setter - and on the right side - is calling the getter.
Center of the frame - which is in the superview's coordinate system
Right-click on view - or even a subview like a button.
Sort of - in ways that it doesn't need to know much about the controller. For example: delegation.
50. The basic steps in custom drawing.
1) Create a context 2) Create paths 3) Set colors - fonts - widths 4) Stroke or fill the above-created paths.
NSSet; no - it's immutable
A framework.
NSLog; %@; %d and other formatters