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