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. How to create a UIView in code?
Never!
[[UIView alloc] initWithFrame]
NSSet; no - it's immutable
Action
2. 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
3. How can I find out the class of any object? Give a line of code.
No - it gets the data from the controller.
NSLog; %@; %d and other formatters
Class XX = [Object class]
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
4. What do I use for a bag of bits?
To zero; so pointers are nil.
Never!
NSData
A rectangular area
5. Remember that it's cool to...
A rectangular area
No...but it has 'a way' to notify the controller to come ask for fresh data.
line up the colons!
zero/nil
6. What does a view (UIView) represent?
NSData
A rectangular area
Properties; instance variables
The runtime system asks the object what its class is.
7. 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
8. Calling a method on id works just fine because....?
The runtime system asks the object what its class is.
the controller's minions. Gets things to the screen.
NSNumber. For example numberWithDouble: and doubleValue:
Can handle any language because it uses Unicode.
9. 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];
[Class respondsToSelector:@selector(aMethod)]
Never!
Outlet; Action
10. The decision on what method to call is made when?
iOS; when the view is loaded.
[[UIView alloc] initWithFrame]
[Class respondsToSelector:@selector(aMethod)]
At runtime.
11. How to tell if an object is of a particular class? (Write a line of code)
self
Creating objects - or finding information relative to the class. The name of the class is the first thing in the square brackets.
'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.
[Object isMemberOfClass:[Classname class]]
12. What is at the top of the view hierarchy?
UIWindow
1.) Ask another object to do it - e.g. with mutableCopy. 2.) Call a class method - 3.) [[Classname alloc] init];
line up the colons!
Import / handle multiple inclusion.
13. How to see all actions - outlets - incoming/outgoing segues on a view?
Right-click on view - or even a subview like a button.
Class XX = [Object class]
Instance method; class method.
constant NSString
14. What is the makeup of a CGPoint?
Never!
(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.
NSArray; no - it's immutable.
Two CGFloats for x and y
15. What does 'weak' mean?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
16. How about the model talking to the controller?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
17. What is a reason to write our own setter?
constant NSString
Argument validation.
Strongly.
A CGPoint and and a CGSize
18. Use ______ to send debugging messages to the console. Use _____ for any object - which should return an string. Can also use ______.
NSLog; %@; %d and other formatters
My rectangle in my superview's coordinate space
NSData
Override drawRect:
19. Show a private interface section.
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
Lazy instantiation.
Strongly.
No...but it has 'a way' to notify the controller to come ask for fresh data.
20. 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.
Points - to achieve device-independence
Yes. As much as it wants.
Dash - Plus sign.
21. 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
22. What does 'strong' mean?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
23. 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
24. How to tell whether an object is of a class or class that inherits from that class? (Write a line of code)
Can handle any language because it uses Unicode.
Class XX = [Object class]
UIViewController.
[Object isKindOfClass:[Classname class]]
25. What is the base class for most objects in the iOS SDK?
NSObject
Yes. As much as it wants.
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.
The runtime system asks the object what its class is.
26. Does a view 'own' the data it displays?
Class XX = [Object class]
No - it gets the data from the controller.
Getter and setter methods.
Designated initializer.
27. Where do I initialize properties?
An outlet.
Center of the frame - which is in the superview's coordinate system
In the getter! This is called lazy instantiation.
[Class respondsToSelector:@selector(aMethod)]
28. When is it OK to call drawRect: directly?
Never!
id; an object pointer
Class XX = [Object class]
[[UIView alloc] initWithFrame]
29. What is in the model?
zero/nil
The document; possibly a database.
Call setNeedsDisplay:
Strong. Object memory is freed at the end of the routine.
30. The setters for outlets are called by _______ at this point ______________.
for...in; don't change things inside the loop.
Argument validation.
NSUserDefaults - which stores a property list.
iOS; when the view is loaded.
31. How to access the controller's top view?
Instance variable (ivar) or 'backing variable'
Immutable. But there are many methods that take an NSString and returned a modified one. This is fast and preferable to using NSMutableString.
UIWindow
self.view
32. What about the view talking to the controller?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
33. ______ is a pointer
Points - to achieve device-independence
NSArray; no - it's immutable.
In the getter! This is called lazy instantiation.
self
34. A _______ goes from the Controller to the View. A ________ goes from the view to the controller.
Outlet; Action
NSUserDefaults - which stores a property list.
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.
'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.
35. Talk about BOOL variables.
The runtime system asks the object what its class is.
NO is zero; YES is anything else.
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
On left side - is calling the setter - and on the right side - is calling the getter.
36. Can the controller talking to the view?
Class XX = [Object class]
addSubview; removeFromSubview
Yes. As much as it wants.
Other MVC trios.
37. What is the word for checking/verifying the type of an object?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
38. When happens when you send a message to nil?
Class XX = [Object class]
NO is zero; YES is anything else.
Nothing happens - and nil is returned.
Two CGFloats for x and y
39. What about controller talking to the model?
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
A rectangular area
the controller's minions. Gets things to the screen.
Yes. The controller knows everything about the model.
40. There is no difference between _____ and _______ at runtime.
Never!
id; an object pointer
To zero; so pointers are nil.
@synthesize; write our own getter and/or setter.
41. Is NSString mutable or not?
internal origin and size. Use this inside a view
No. Use NSMutableArray - which is a subclass of NSArray.
Immutable. But there are many methods that take an NSString and returned a modified one. This is fast and preferable to using NSMutableString.
id
42. Classes cannot have _________ or ___________.
NSLog; %@; %d and other formatters
Properties; instance variables
Controls how the model is presented onscreen.
self
43. The controller is always a subclass of...?
Strongly.
Lazy instantiation.
UIViewController.
Override drawRect:
44. How are local variables initialized in iOS 5?
To zero; so pointers are 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.
1) Create a context 2) Create paths 3) Set colors - fonts - widths 4) Stroke or fill the above-created paths.
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
45. How is ARC done?
Properties; instance variables
The compiler adds code to count references.
Creating objects - or finding information relative to the class. The name of the class is the first thing in the square brackets.
Center of the frame - which is in the superview's coordinate system
46. How can I save user information between launches of my app?
[Object isMemberOfClass:[Classname class]]
Instance method; class method.
NSUserDefaults - which stores a property list.
The document; possibly a database.
47. What about the model and the view talking to one another?
Never!
Interface; Implementation
On left side - is calling the setter - and on the right side - is calling the getter.
Right-click on view - or even a subview like a button.
48. 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
49. What to do in Xcode for short documentation? For full documentation?
option-click; option-double-click
NSUserDefaults - which stores a property list.
NSSet; no - it's immutable
A framework.
50. The view is...
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
Sorry!:) No result found.
Can you answer 50 questions in 15 minutes?
Let me suggest you:
Browse all subjects
Browse all tests
Most popular tests
Major Subjects
Tests & Exams
AP
CLEP
DSST
GRE
SAT
GMAT
Certifications
CISSP go to https://www.isc2.org/
PMP
ITIL
RHCE
MCTS
More...
IT Skills
Android Programming
Data Modeling
Objective C Programming
Basic Python Programming
Adobe Illustrator
More...
Business Skills
Advertising Techniques
Business Accounting Basics
Business Strategy
Human Resource Management
Marketing Basics
More...
Soft Skills
Body Language
People Skills
Public Speaking
Persuasion
Job Hunting And Resumes
More...
Vocabulary
GRE Vocab
SAT Vocab
TOEFL Essential Vocab
Basic English Words For All
Global Words You Should Know
Business English
More...
Languages
AP German Vocab
AP Latin Vocab
SAT Subject Test: French
Italian Survival
Norwegian Survival
More...
Engineering
Audio Engineering
Computer Science Engineering
Aerospace Engineering
Chemical Engineering
Structural Engineering
More...
Health Sciences
Basic Nursing Skills
Health Science Language Fundamentals
Veterinary Technology Medical Language
Cardiology
Clinical Surgery
More...
English
Grammar Fundamentals
Literary And Rhetorical Vocab
Elements Of Style Vocab
Introduction To English Major
Complete Advanced Sentences
Literature
Homonyms
More...
Math
Algebra Formulas
Basic Arithmetic: Measurements
Metric Conversions
Geometric Properties
Important Math Facts
Number Sense Vocab
Business Math
More...
Other Major Subjects
Science
Economics
History
Law
Performing-arts
Cooking
Logic & Reasoning
Trivia
Browse all subjects
Browse all tests
Most popular tests