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