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