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 Objective C
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. Delegation is an object oriented approach to
define it in the implemenation file
You take ownership for an object you want to keep a pointer to
data
callbacks
2. Objective C only allows for single inheritance - so in regards to class you only ever see the following pattern
for inheritance - adopting the superclasses implementation
unordered collection of objects - objects must be unique
to get and set variables
@interface ClassName:SuperClassName
3. super - is used...
receiving and handling events that are associated with it
CGFloat
for inheritance - adopting the superclasses implementation
data
4. A function in the objective c library that simply displays or logs it's argument
superclass's
NSLog routine
UIViewController
values
5. Order of the declarations for methods. _ come first - followed by _ - followed by any other methods...
You take ownership for an object you want to keep a pointer to
class methods - initializers
new instances of the class or retrieve some global property of the class.
Generic object wrapper for other non-object data types
6. Also - because arrays only hold a pointer to an object...
data source - delegate and view controller
super - self
a single-array can contain objects of different types
class
7. If the view has no subviews - create it programmatically; if it has subviews
create a XIB file
pointers
self
Data Encapsulation
8. SomeClass* aVariable = [[SomeClass alloc] init]; is an example of what kind of instance?
Instantiation from scratch
retain
instance
instance variable of an object is valid
9. Number one use of protocols in iOS...
NSBundle
creates an instance of NSString that holds the character string
delegates and dataSources
instance variables
10. NSDate - class...
its dataSource
ordered collection of objects - immutable
Used to find the time right now or to store past or future time/dates
Functions
11. A class inherits all _ from its superclass and can add as many as it wants for its own purposes....
receiver[message]
only the innermost loop in which the break is executed is terminated
@synthesize
initializers
12. NSString *s = @'Hello - World'; is an example of...
receiver
type - name and value
declaration and initialization of a variable
nil
13. A UITableViewController can fill all three roles of...
data source - view controller and delegate
instance variables
C Functionn
method
14. Reducing details to focus on the core concepts
receiver
Abstraction
a single-array can contain objects of different types
CGRect
15. Asking a class or object to execute a method
array[class - NSMutableArray]
message
its dataSource
a single-array can contain objects of different types
16. A view is an...
instance of UIView or one of its subclasses
Controller Objects[Managers]
NSBundle
rectangular
17. When making a tableView always...
reuse your cells
rectangular
variable scope - if defined within a block
You take ownership for an object you want to keep a pointer to
18. Prefixing a character string with an @ symbol [specific - NSString class]...
causes the program to immediately exit from the loop it is executing - whether its for - while or do
creates an instance of NSString that holds the character string
class
nil
19. A message is always contained in square brackets - and has three parts
parentViewController
receiver - selector - arguments
Anytime you call a method with new - alloc or copy. You own and must release that object.
header files declare
20. A delegate is a pointer to an object with a set of methods the delegate-holder knows how to call. In other words - it's _ from a later created object
'getters' and 'setters'
Object wrapper around primitive types like int - float - double - BOOl
a mechanism to enable specific callbacks
type - name and value
21. Keep view and model objects in sync - control the 'flow' of the application - and save the model objects out to the filesystem
an object's property
Controller Objects[Managers]
viewWillDissapear: and viewWillAppear:
draw images
22. A responder is responsible for...
Model Objects[Factory Worker]
the array relinquishes ownership of that object and no longer has a pointer to it
position
receiving and handling events that are associated with it
23. Center and frame are used to _ your view
is an instance of that class
receiving and handling events that are associated with it
position
dealloc - is called on the object & the object's memory is returned to the heap
24. When an NSMutableArray is deallocated - it sends...
accessors - individually we call them 'getters' and 'setters'
Anytime you call a method with new - alloc or copy. You own and must release that object.
pointer to an object
the message release to all its entries
25. A block of statements identified by a name that can accept one or more arguments passed to it by value and can optionally return a value
Functions
do so in viewDidLoad
creates an instance of NSString that holds the character string
self
26. What happens when the last owner calls release?
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
27. NSDictionary...
Hash table - Look up objects using a key to get a value.
callbacks
data source - delegate and view controller
only the class and subclasses can access
28. To load a Xib file manually - you use _
declaration and initialization of a variable
storage
size and position
NSBundle
29. Dynamic binding means that when we call a certain object's method - and there are several _ of that method - the right one is figured out at runtime.
Instantiation from scratch
to get and set variables
implementation
wait until the loop finishes processing the event - at the end release it
30. The integer prefix is...
CGRect bounds - GCPoint center - CGRect frame
'getters' and 'setters'
receiver[message]
%d
31. NSString objects are usually sent _ rather than _...
Instantiation from scratch
copy - retain
dealloc - is called on the object & the object's memory is returned to the heap
Encapsulation of functionality
32. if you implemented both the setter and getter - the @synthesize method...
wait until the loop finishes processing the event - at the end release it
Anytime you call a method with new - alloc or copy. You own and must release that object.
will be ignored
only the innermost loop in which the break is executed is terminated
33. Variable names tend to start with a _ letter; class names tend to start with an _ letter.
type - name and value
data
lowercase - uppercase
methods for generating an instance
34. In Objective C arrays can hold only...
Generic object wrapper for other non-object data types
position
references to objects
viewWillAppear - viewDidAppear - viewWillDisappear & viewDidDisappear
35. Each class picks one _ as it's designated initializer....
class
initializer
(id)initWithFrame:(CGRect)aRect;
nil
36. Classes describe two things...
Controller Objects[Managers]
attributes - behavior
rectangular
@synthesize
37. In the last line of an init method...
creating an initializer
you always return the newly initialized object(return self)
pointers
define it in the implemenation file
38. Name of the new class - it's superclass - the instance variables that each instance of this class has - and any methods this class implements
they need to be defined in the implementation file
to get and set variables
parentViewController
header files declare
39. Instance Variables by default are called @protected meaning...
Anytime you call a method with new - alloc or copy. You own and must release that object.
object
view
only the class and subclasses can access
40. What does autorelease mean?
array[class - NSMutableArray]
a mechanism to enable specific callbacks
wait until the loop finishes processing the event - at the end release it
CGFloat
41. Execution of the break statement...
causes the program to immediately exit from the loop it is executing - whether its for - while or do
Controller Objects[Managers]
wait until the loop finishes processing the event - at the end release it
instance of UIView or one of its subclasses
42. When an object is removed from an NSMutableArray - that object is sent the message release;...
accessors - individually we call them 'getters' and 'setters'
(id)initWithFrame:(CGRect)aRect;
the array relinquishes ownership of that object and no longer has a pointer to it
CGRect
43. If a class declares a _ that is different from its superclass - you must override the superclass' _ to call the new _...
designated initializer
rectangular
do so in viewDidLoad
references to objects
44. In a class method you cannot access...
the instance variables
subview(s)
draw images
receiver
45. A view represents a _ area
instance
NSCoder
rectangular
position
46. A method in a _ is required unless its preceded by an @optional.
causes the program to immediately exit from the loop it is executing - whether its for - while or do
data
count - objectAtIndex - makeObjectsPerformSelector - sortedArrayUsingSelector - lastObject
protocol
47. A view is a subclass of _
reuse your cells
message
UIView
callbacks
48. Typically the designated initializer has parameters for the most important and frequently used _ of an object
Anytime you call a method with new - alloc or copy. You own and must release that object.
attributes - behavior
do so in viewDidLoad
instance variables
49. How do I implement my drawRect?
callbacks
pointer to an object
alloc - singleton - informational utility method?
Core Graphics Framework
50. NSArray - class...
ordered collection of objects - immutable
CGRect bounds
You take ownership for an object you want to keep a pointer to
Continue