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 in the model?
iOS; when the view is loaded.
No. Use NSMutableArray - which is a subclass of NSArray.
create a model
The document; possibly a database.
2. What do I use for a hash table/associative array? And is it mutable?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
3. 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
4. Why are properties good?
self
[Class respondsToSelector:@selector(aMethod)]
Action
(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.
5. List the iOS hierarchy from top to bottom.
My rectangle in my superview's coordinate space
Points - to achieve device-independence
Cocoa Touch - Media - Core Services - Core OS
Override drawRect:
6. Objects in an array: are the pointed to strongly or weakly?
Class XX = [Object class]
the controller's minions. Gets things to the screen.
Strongly.
Never!
7. What is the makeup of a CGPoint?
Two CGFloats for x and y
Outlet; Action
My rectangle in my superview's coordinate space
The runtime system asks the object what its class is.
8. Does a view 'own' the data it displays?
Argument validation.
iOS; when the view is loaded.
UIWindow
No - it gets the data from the controller.
9. How can I find out the class of any object? Give a line of code.
addSubview; removeFromSubview
The document; possibly a database.
Class XX = [Object class]
My rectangle in my superview's coordinate space
10. 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
11. What does a view (UIView) represent?
A rectangular area
At runtime.
line up the colons!
'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.
12. 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
13. 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
14. There is no difference between _____ and _______ at runtime.
No...but it has 'a way' to notify the controller to come ask for fresh data.
Strongly.
id; an object pointer
Argument validation.
15. Where do I initialize properties?
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
[Object isKindOfClass:[Classname class]]
In the getter! This is called lazy instantiation.
NSData
16. What is the base class for most objects in the iOS SDK?
Import / handle multiple inclusion.
NSObject
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
17. What is at the top of the view hierarchy?
UIWindow
Outlet; Action
No. It's fine.
1) Create a context 2) Create paths 3) Set colors - fonts - widths 4) Stroke or fill the above-created paths.
18. What is used in lieu of pixels? And why?
id
One; zero to many
Points - to achieve device-independence
Call setNeedsDisplay:
19. How to create a UIView in code?
Instance method; class method.
NSNumber. For example numberWithDouble: and doubleValue:
[[UIView alloc] initWithFrame]
No. It's fine.
20. Some controllers have ____________ as their views.
On left side - is calling the setter - and on the right side - is calling the getter.
NSLog; %@; %d and other formatters
Other MVC trios.
Yes. As much as it wants.
21. Show a private interface section.
1) Create a context 2) Create paths 3) Set colors - fonts - widths 4) Stroke or fill the above-created paths.
The runtime system asks the object what its class is.
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
addSubview; removeFromSubview
22. Instead of 'include' statements - in Objective-C we use _______ which does ________
Import / handle multiple inclusion.
NSObject
constant NSString
internal origin and size. Use this inside a view
23. How to add subviews in code? How to remove them?
Introspection - with the class method 'class'
addSubview; removeFromSubview
zero/nil
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
24. 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.
A CGPoint and and a CGSize
Designated initializer.
25. 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
26. What is the makeup of a CGSize?
My rectangle in my superview's coordinate space
NSNumber. For example numberWithDouble: and doubleValue:
Two floats - for width and height
No...but it has 'a way' to notify the controller to come ask for fresh data.
27. Is NSString mutable or not?
A CGPoint and and a CGSize
Immutable. But there are many methods that take an NSString and returned a modified one. This is fast and preferable to using NSMutableString.
Controls how the model is presented onscreen.
[Class respondsToSelector:@selector(aMethod)]
28. Calling a method on id works just fine because....?
addSubview; removeFromSubview
NSLog; %@; %d and other formatters
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.
29. When is it OK to call drawRect: directly?
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.
Yes. As much as it wants.
Nothing happens - and nil is returned.
30. Instance methods start with a ______ and class methods start with a ______.
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.
Call setNeedsDisplay:
Dash - Plus sign.
31. What is the iOS term for a library?
Instance variable (ivar) or 'backing variable'
Center of the frame - which is in the superview's coordinate system
A framework.
Designated initializer.
32. 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];
Two floats - for width and height
A CGPoint and and a CGSize
A rectangular area
33. What is a property list?
NO is zero; YES is anything else.
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
[Object isMemberOfClass:[Classname class]]
Override drawRect:
34. A _______ is how a view notifies the controller of something - for example - a button press.
Action
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.
The document; possibly a database.
Outlet; Action
35. How many superviews does a view have? How many subviews?
1) Create a context 2) Create paths 3) Set colors - fonts - widths 4) Stroke or fill the above-created paths.
One; zero to many
Lazy instantiation.
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
36. ________ is the .h file and __________ is the .m file.
Interface; Implementation
One; zero to many
constant NSString
'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.'
37. How is ARC done?
Yes. As much as it wants.
NSLog; %@; %d and other formatters
The compiler adds code to count references.
Class XX = [Object class]
38. Remember that it's cool to...
The compiler adds code to count references.
Instance method; class method.
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.
line up the colons!
39. How to force a redraw of a custom area?
Call setNeedsDisplay:
Immutable. But there are many methods that take an NSString and returned a modified one. This is fast and preferable to using NSMutableString.
zero/nil
constant NSString
40. The setters for outlets are called by _______ at this point ______________.
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];
Cocoa Touch - Media - Core Services - Core OS
iOS; when the view is loaded.
41. What does 'weak' mean?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
42. Classes cannot have _________ or ___________.
[[UIView alloc] initWithFrame]
Creating objects - or finding information relative to the class. The name of the class is the first thing in the square brackets.
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
Properties; instance variables
43. 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
44. 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
45. What if I want to put a scalar into an NSArray or NSSet?
Strong. Object memory is freed at the end of the routine.
Wrap it in NSValue. And remember that NSValue immutable.
Dash - Plus sign.
1.) Ask another object to do it - e.g. with mutableCopy. 2.) Call a class method - 3.) [[Classname alloc] init];
46. Is NSArray mutable?
for...in; don't change things inside the loop.
'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.
No. Use NSMutableArray - which is a subclass of NSArray.
Getter and setter methods.
47. In the initializer methods of objects I create - add what line of code? Why?
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.
No. Use NSMutableArray - which is a subclass of NSArray.
MVC - for model-view-controller
Yes. The controller knows everything about the model.
48. All classes should have a __________________ to be called by subclasses.
Designated initializer.
UIViewController.
UIWindow
@synthesize; write our own getter and/or setter.
49. Use ______ to send debugging messages to the console. Use _____ for any object - which should return an string. Can also use ______.
At runtime.
UIViewController.
NSLog; %@; %d and other formatters
Interface; Implementation
50. What do I use for a bag of bits?
id
UIWindow
NSData
A framework.
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