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 fundamental design pattern of iOS development?
The document; possibly a database.
self.view
MVC - for model-view-controller
An outlet.
2. What is a property list?
The document; possibly a database.
Properties; instance variables
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
Two CGFloats for x and y
3. If a method starts with a dash - it's a ___________. If it starts with a plus sign - it's a ______________.
id; an object pointer
@synthesize; write our own getter and/or setter.
1) Create a context 2) Create paths 3) Set colors - fonts - widths 4) Stroke or fill the above-created paths.
Instance method; class method.
4. What is an example of a reason to write a getter?
The compiler adds code to count references.
Lazy instantiation.
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
Class XX = [Object class]
5. Talk about NSString
Sort of - in ways that it doesn't need to know much about the controller. For example: delegation.
Nothing happens - and nil is returned.
constant NSString
Can handle any language because it uses Unicode.
6. What do I use for a bag of bits?
NSData
Instance method; class method.
At runtime.
Properties; instance variables
7. Remember that it's cool to...
Class XX = [Object class]
line up the colons!
In the getter! This is called lazy instantiation.
No...but it has 'a way' to notify the controller to come ask for fresh data.
8. What is the bounds property of a UIView?
internal origin and size. Use this inside a view
Creating objects - or finding information relative to the class. The name of the class is the first thing in the square brackets.
No - it gets the data from the controller.
Import / handle multiple inclusion.
9. There is no difference between _____ and _______ at runtime.
[Class respondsToSelector:@selector(aMethod)]
Class XX = [Object class]
id; an object pointer
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.
10. ________ is the .h file and __________ is the .m file.
Interface; Implementation
option-click; option-double-click
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.
11. 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.
NO is zero; YES is anything else.
Class XX = [Object class]
Points - to achieve device-independence
12. How many superviews does a view have? How many subviews?
Controls how the model is presented onscreen.
One; zero to many
Instance method; class method.
Strongly.
13. Where do I initialize properties?
UIWindow
No...but it has 'a way' to notify the controller to come ask for fresh data.
NSNumber. For example numberWithDouble: and doubleValue:
In the getter! This is called lazy instantiation.
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. How to tell whether an object is of a class or class that inherits from that class? (Write a line of code)
No - it gets the data from the controller.
Center of the frame - which is in the superview's coordinate system
[Object isKindOfClass:[Classname class]]
1.) Ask another object to do it - e.g. with mutableCopy. 2.) Call a class method - 3.) [[Classname alloc] init];
16. How to tell whether an object implements a particular method? (A line of code)
Action
Outlet; Action
UIWindow
[Class respondsToSelector:@selector(aMethod)]
17. How to do enumeration with NSArray - NSDictionary - etc?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
18. What about controller talking to the model?
Points - to achieve device-independence
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.
Yes. The controller knows everything about the model.
The runtime system asks the object what its class is.
19. In the initializer methods of objects I create - add what line of code? Why?
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.
UIWindow
No. Use NSMutableArray - which is a subclass of NSArray.
NSDictionary; no - it's immutable.
20. 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
21. 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.
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.
Two CGFloats for x and y
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.
22. The single-view template in Xcode does not...
Points - to achieve device-independence
Import / handle multiple inclusion.
create a model
Designated initializer.
23. What does 'weak' mean?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
24. How to force a redraw of a custom area?
option-click; option-double-click
Call setNeedsDisplay:
Yes. The controller knows everything about the model.
To zero; so pointers are nil.
25. What is the base class for most objects in the iOS SDK?
UIViewController.
Yes. As much as it wants.
On left side - is calling the setter - and on the right side - is calling the getter.
NSObject
26. Objects in an array: are the pointed to strongly or weakly?
Strongly.
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
One; zero to many
The runtime system asks the object what its class is.
27. When happens when you send a message to nil?
Nothing happens - and nil is returned.
Immutable. But there are many methods that take an NSString and returned a modified one. This is fast and preferable to using NSMutableString.
Other MVC trios.
constant NSString
28. How is ARC done?
The compiler adds code to count references.
Two floats - for width and height
Dash - Plus sign.
addSubview; removeFromSubview
29. How to create a UIView in code?
Properties; instance variables
Other MVC trios.
NSSet; no - it's immutable
[[UIView alloc] initWithFrame]
30. What if I want to put a scalar into an NSArray or NSSet?
NSObject
Sort of - in ways that it doesn't need to know much about the controller. For example: delegation.
Wrap it in NSValue. And remember that NSValue immutable.
A framework.
31. All classes should have a __________________ to be called by subclasses.
Argument validation.
Center of the frame - which is in the superview's coordinate system
Designated initializer.
line up the colons!
32. 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
33. How to access the controller's top view?
self.view
Never!
the controller's minions. Gets things to the screen.
Override drawRect:
34. What is a reason to write our own setter?
Argument validation.
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];
NO is zero; YES is anything else.
35. How can I find out the class of any object? Give a line of code.
option-click; option-double-click
@interface JGEmailLoginEmailViewController(){ NSMutableData _receivedData; }@property (weak -nonatomic) JGAppDelegate appDelegate;@property (weak - nonatomic) IBOutlet UITextField *txtfldEmailAddress;@end
Designated initializer.
Class XX = [Object class]
36. ______ is a pointer to any object.
Can handle any language because it uses Unicode.
id
Yes. The controller knows everything about the model.
option-click; option-double-click
37. 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
38. When is it OK to call drawRect: directly?
To zero; so pointers are nil.
1) Create a context 2) Create paths 3) Set colors - fonts - widths 4) Stroke or fill the above-created paths.
The document; possibly a database.
Never!
39. Is NSArray mutable?
addSubview; removeFromSubview
A collection of collections in graph form. Can include NSArray - NSDictionary - NSNumber - NSString - NSData - and NSData.
Never!
No. Use NSMutableArray - which is a subclass of NSArray.
40. Are local pointers to objects strong or weak? So what happens at the end of the routine?
the controller's minions. Gets things to the screen.
Strong. Object memory is freed at the end of the routine.
Getter and setter methods.
Outlet; Action
41. Some controllers have ____________ as their views.
NSNumber. For example numberWithDouble: and doubleValue:
MVC - for model-view-controller
NSUserDefaults - which stores a property list.
Other MVC trios.
42. A property is just the combination of _______.
UIWindow
Properties; instance variables
Strong. Object memory is freed at the end of the routine.
Getter and setter methods.
43. What is the name of a property in the controller that it uses to talk to views?
The document; possibly a database.
line up the colons!
An outlet.
Properties; instance variables
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. What does the controller do?
iOS; when the view is loaded.
Points - to achieve device-independence
[Class respondsToSelector:@selector(aMethod)]
Controls how the model is presented onscreen.
46. What is in the model?
Introspection - with the class method 'class'
The document; possibly a database.
self
Sort of - in ways that it doesn't need to know much about the controller. For example: delegation.
47. How to tell if an object is of a particular class? (Write a line of code)
[Object isMemberOfClass:[Classname class]]
Strong. Object memory is freed at the end of the routine.
[[UIView alloc] initWithFrame]
Import / handle multiple inclusion.
48. ______ is a pointer
self
UIViewController.
Outlet; Action
A CGPoint and and a CGSize
49. Is NSString mutable or not?
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.
Immutable. But there are many methods that take an NSString and returned a modified one. This is fast and preferable to using NSMutableString.
internal origin and size. Use this inside a view
50. Talk about BOOL variables.
Cocoa Touch - Media - Core Services - Core OS
NO is zero; YES is anything else.
UIWindow
Strongly.
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