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