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 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
2. The basic steps in custom drawing.
addSubview; removeFromSubview
1) Create a context 2) Create paths 3) Set colors - fonts - widths 4) Stroke or fill the above-created paths.
1.) Ask another object to do it - e.g. with mutableCopy. 2.) Call a class method - 3.) [[Classname alloc] init];
My rectangle in my superview's coordinate space
3. What is the makeup of a CGPoint?
(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.
NSLog; %@; %d and other formatters
To zero; so pointers are nil.
Two CGFloats for x and y
4. Calling a method on id works just fine because....?
The runtime system asks the object what its class is.
Yes. The controller knows everything about the model.
An outlet.
Import / handle multiple inclusion.
5. A _______ is how a view notifies the controller of something - for example - a button press.
line up the colons!
Action
Sort of - in ways that it doesn't need to know much about the controller. For example: delegation.
for...in; don't change things inside the loop.
6. What is the fundamental design pattern of iOS development?
A CGPoint and and a CGSize
NSUserDefaults - which stores a property list.
MVC - for model-view-controller
No - it gets the data from the controller.
7. How can I save user information between launches of my app?
NSUserDefaults - which stores a property list.
Argument validation.
Instance variable (ivar) or 'backing variable'
Cocoa Touch - Media - Core Services - Core OS
8. How to tell whether an object implements a particular method? (A line of code)
[Class respondsToSelector:@selector(aMethod)]
The compiler adds code to count references.
Nothing happens - and nil is returned.
id; an object pointer
9. 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
10. What is the makeup of a CGRect?
Argument validation.
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
id; an object pointer
A CGPoint and and a CGSize
11. What does a view (UIView) represent?
A rectangular area
[Object isKindOfClass:[Classname class]]
NSNumber. For example numberWithDouble: and doubleValue:
[Object isMemberOfClass:[Classname class]]
12. Show a private interface section.
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
1) Create a context 2) Create paths 3) Set colors - fonts - widths 4) Stroke or fill the above-created paths.
Strongly.
Never!
13. In a nutshell: how to do custom drawing?
for...in; don't change things inside the loop.
Override drawRect:
option-click; option-double-click
[Class respondsToSelector:@selector(aMethod)]
14. How are local variables initialized in iOS 5?
Getter and setter methods.
To zero; so pointers are nil.
[Class respondsToSelector:@selector(aMethod)]
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
15. How to force a redraw of a custom area?
NSLog; %@; %d and other formatters
@synthesize; write our own getter and/or setter.
Call setNeedsDisplay:
for...in; don't change things inside the loop.
16. What does 'strong' mean?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
17. Where do I initialize properties?
[Object isMemberOfClass:[Classname class]]
In the getter! This is called lazy instantiation.
constant NSString
Controls how the model is presented onscreen.
18. What is the base class for most objects in the iOS SDK?
[[UIView alloc] initWithFrame]
Yes. As much as it wants.
NSObject
zero/nil
19. The controller is always a subclass of...?
Can handle any language because it uses Unicode.
To zero; so pointers are nil.
Wrap it in NSValue. And remember that NSValue immutable.
UIViewController.
20. How can I find out the class of any object? Give a line of code.
create a model
Class XX = [Object class]
A CGPoint and and a CGSize
line up the colons!
21. How many superviews does a view have? How many subviews?
NO is zero; YES is anything else.
One; zero to many
Creating objects - or finding information relative to the class. The name of the class is the first thing in the square brackets.
To zero; so pointers are nil.
22. Class methods are used for ___________ and the call starts with ____________.
Dash - Plus sign.
No - it gets the data from the controller.
Creating objects - or finding information relative to the class. The name of the class is the first thing in the square brackets.
Strongly.
23. Is NSArray mutable?
Sort of - in ways that it doesn't need to know much about the controller. For example: delegation.
Nothing happens - and nil is returned.
No. Use NSMutableArray - which is a subclass of NSArray.
UIViewController.
24. The decision on what method to call is made when?
Strong. Object memory is freed at the end of the routine.
At runtime.
Interface; Implementation
UIViewController.
25. Classes cannot have _________ or ___________.
Properties; instance variables
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.
Never!
UIWindow
26. What does 'weak' mean?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
27. Is it always bad to send messages to id?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
28. What do I use for a bag of bits?
NSNumber. For example numberWithDouble: and doubleValue:
NSData
Call setNeedsDisplay:
self
29. What to do in Xcode for short documentation? For full documentation?
Other MVC trios.
Introspection - with the class method 'class'
Controls how the model is presented onscreen.
option-click; option-double-click
30. 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
31. If I need to convert a number to an object - use __________
internal origin and size. Use this inside a view
The runtime system asks the object what its class is.
NSNumber. For example numberWithDouble: and doubleValue:
Instance variable (ivar) or 'backing variable'
32. 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
33. What if I want to put a scalar into an NSArray or NSSet?
The document; possibly a database.
1.) Ask another object to do it - e.g. with mutableCopy. 2.) Call a class method - 3.) [[Classname alloc] init];
Wrap it in NSValue. And remember that NSValue immutable.
Instance variable (ivar) or 'backing variable'
34. What is a property list?
(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.
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
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.
Outlet; Action
35. How to create a UIView in code?
[[UIView alloc] initWithFrame]
A CGPoint and and a CGSize
Creating objects - or finding information relative to the class. The name of the class is the first thing in the square brackets.
1.) Ask another object to do it - e.g. with mutableCopy. 2.) Call a class method - 3.) [[Classname alloc] init];
36. All classes should have a __________________ to be called by subclasses.
NSDictionary; no - it's immutable.
Argument validation.
Designated initializer.
No - it gets the data from the controller.
37. How to see all actions - outlets - incoming/outgoing segues on a view?
Interface; Implementation
No. It's fine.
Right-click on view - or even a subview like a button.
NO is zero; YES is anything else.
38. ________ implements the getter and setter. But we can always__________
Never!
Two floats - for width and height
NO is zero; YES is anything else.
@synthesize; write our own getter and/or setter.
39. How to tell if an object is of a particular class? (Write a line of code)
[Object isMemberOfClass:[Classname class]]
UIViewController.
Action
Controls how the model is presented onscreen.
40. The single-view template in Xcode does not...
create a model
Two CGFloats for x and y
constant NSString
'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.
41. 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
42. 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
43. Talk about BOOL variables.
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 is zero; YES is anything else.
My rectangle in my superview's coordinate space
No...but it has 'a way' to notify the controller to come ask for fresh data.
44. What is used in lieu of pixels? And why?
A CGPoint and and a CGSize
NSNumber. For example numberWithDouble: and doubleValue:
Nothing happens - and nil is returned.
Points - to achieve device-independence
45. Use ______ to send debugging messages to the console. Use _____ for any object - which should return an string. Can also use ______.
Instance method; class method.
Introspection - with the class method 'class'
Class XX = [Object class]
NSLog; %@; %d and other formatters
46. All properties are initialized to _____
Import / handle multiple inclusion.
NSObject
Override drawRect:
zero/nil
47. Instead of 'include' statements - in Objective-C we use _______ which does ________
UIWindow
Import / handle multiple inclusion.
(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.
Getter and setter methods.
48. What do I use for an ordered collection of objects? And is it mutable?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
49. What is the makeup of a CGSize?
Two floats - for width and height
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.
NSArray; no - it's immutable.
[Class respondsToSelector:@selector(aMethod)]
50. If a method starts with a dash - it's a ___________. If it starts with a plus sign - it's a ______________.
Nothing happens - and nil is returned.
Outlet; Action
Import / handle multiple inclusion.
Instance method; class method.