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. Talk about BOOL variables.
Call setNeedsDisplay:
The document; possibly a database.
NO is zero; YES is anything else.
'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.'
2. 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
3. Calling a method on id works just fine because....?
Sort of - in ways that it doesn't need to know much about the controller. For example: delegation.
Points - to achieve device-independence
The runtime system asks the object what its class is.
At runtime.
4. Is NSArray mutable?
Controls how the model is presented onscreen.
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.
addSubview; removeFromSubview
No. Use NSMutableArray - which is a subclass of NSArray.
5. What does 'strong' mean?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
6. Does a view 'own' the data it displays?
A rectangular area
At runtime.
No - it gets the data from the controller.
Strong. Object memory is freed at the end of the routine.
7. How are local variables initialized in iOS 5?
NO is zero; YES is anything else.
Import / handle multiple inclusion.
To zero; so pointers are nil.
Designated initializer.
8. What is an example of a reason to write a getter?
Right-click on view - or even a subview like a button.
Nothing happens - and nil is returned.
Lazy instantiation.
NSSet; no - it's immutable
9. 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
10. The view is...
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
11. When is it OK to call drawRect: directly?
No...but it has 'a way' to notify the controller to come ask for fresh data.
[Class respondsToSelector:@selector(aMethod)]
Designated initializer.
Never!
12. What is the fundamental design pattern of iOS development?
MVC - for model-view-controller
NSDictionary; no - it's immutable.
NSData
Two floats - for width and height
13. 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
14. 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
15. Can the controller talking to the view?
constant NSString
Strong. Object memory is freed at the end of the routine.
Yes. As much as it wants.
NSUserDefaults - which stores a property list.
16. Show a private interface section.
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
The runtime system asks the object what its class is.
An outlet.
option-click; option-double-click
17. ______ is a pointer to any object.
NSDictionary; no - it's immutable.
My rectangle in my superview's coordinate space
id
Override drawRect:
18. What is the name of a property in the controller that it uses to talk to views?
An outlet.
1.) Ask another object to do it - e.g. with mutableCopy. 2.) Call a class method - 3.) [[Classname alloc] init];
One; zero to many
The document; possibly a database.
19. Instance methods start with a ______ and class methods start with a ______.
NSDictionary; no - it's immutable.
Dash - Plus sign.
NSSet; no - it's immutable
NSArray; no - it's immutable.
20. What does the controller do?
Points - to achieve device-independence
Controls how the model is presented onscreen.
At runtime.
iOS; when the view is loaded.
21. How can I find out the class of any object? Give a line of code.
Cocoa Touch - Media - Core Services - Core OS
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
UIViewController.
Class XX = [Object class]
22. In a nutshell: how to do custom drawing?
'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.
The runtime system asks the object what its class is.
NSDictionary; no - it's immutable.
Override drawRect:
23. 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
24. How many superviews does a view have? How many subviews?
Never!
One; zero to many
A CGPoint and and a CGSize
Properties; instance variables
25. What is the makeup of a CGRect?
Argument validation.
iOS; when the view is loaded.
A CGPoint and and a CGSize
[Object isMemberOfClass:[Classname class]]
26. 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) 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.
Sort of - in ways that it doesn't need to know much about the controller. For example: delegation.
Designated initializer.
27. If I need to convert a number to an object - use __________
NSNumber. For example numberWithDouble: and doubleValue:
internal origin and size. Use this inside a view
One; zero to many
At runtime.
28. What does 'weak' mean?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
29. 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
iOS; when the view is loaded.
NSData
The compiler adds code to count references.
30. The setters for outlets are called by _______ at this point ______________.
NSUserDefaults - which stores a property list.
Outlet; Action
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.
31. Are local pointers to objects strong or weak? So what happens at the end of the routine?
Center of the frame - which is in the superview's coordinate system
Right-click on view - or even a subview like a button.
Strong. Object memory is freed at the end of the routine.
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
32. 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
33. 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
34. What if I want to put a scalar into an NSArray or NSSet?
Call setNeedsDisplay:
Wrap it in NSValue. And remember that NSValue immutable.
Center of the frame - which is in the superview's coordinate system
Strong. Object memory is freed at the end of the routine.
35. The controller is always a subclass of...?
Two floats - for width and height
Nothing happens - and nil is returned.
UIViewController.
Can handle any language because it uses Unicode.
36. Where do I initialize properties?
Instance variable (ivar) or 'backing variable'
In the getter! This is called lazy instantiation.
One; zero to many
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.
37. What about the model and the view talking to one another?
Never!
[[UIView alloc] initWithFrame]
On left side - is calling the setter - and on the right side - is calling the getter.
self
38. All classes should have a __________________ to be called by subclasses.
Designated initializer.
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
The compiler adds code to count references.
create a model
39. Instead of 'include' statements - in Objective-C we use _______ which does ________
Import / handle multiple inclusion.
No - it gets the data from the controller.
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.
MVC - for model-view-controller
40. 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
41. What to do in Xcode for short documentation? For full documentation?
addSubview; removeFromSubview
[Object isKindOfClass:[Classname class]]
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.
option-click; option-double-click
42. What is a property list?
'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.
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
zero/nil
Call setNeedsDisplay:
43. What about controller talking to the model?
Yes. The controller knows everything about the model.
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
Can handle any language because it uses Unicode.
Cocoa Touch - Media - Core Services - Core OS
44. What is the makeup of a CGPoint?
for...in; don't change things inside the loop.
Yes. The controller knows everything about the model.
Two CGFloats for x and y
Strong. Object memory is freed at the end of the routine.
45. What does a view (UIView) represent?
Import / handle multiple inclusion.
Call setNeedsDisplay:
[[UIView alloc] initWithFrame]
A rectangular area
46. A property is just the combination of _______.
Getter and setter methods.
Right-click on view - or even a subview like a button.
Instance method; class method.
Two CGFloats for x and y
47. All properties are initialized to _____
zero/nil
A rectangular area
Other MVC trios.
The compiler adds code to count references.
48. The single-view template in Xcode does not...
No. It's fine.
Argument validation.
id
create a model
49. 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.
Call setNeedsDisplay:
for...in; don't change things inside the loop.
Properties; instance variables
50. Classes cannot have _________ or ___________.
Properties; instance variables
NO is zero; YES is anything else.
At runtime.
No - it gets the data from the controller.
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