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. What does autorelease mean?
wait until the loop finishes processing the event - at the end release it
the message release to all its entries
calling code that does the instantiation for you
instance variables
2. Only exists within the statement block there defined - outside of the block is fine
variable scope - if defined within a block
self
pointer to an object
class's
3. A method in a _ is required unless its preceded by an @optional.
Is a placeholder object
methods for generating an instance
protocol
the message release to all its entries
4. In the last line of an init method...
You take ownership for an object you want to keep a pointer to
protocol
you always return the newly initialized object(return self)
setPossessionName
5. Whenever a UINavigationController is about to swap views - it sends out two messages
viewWillDissapear: and viewWillAppear:
class's
UIView
the array becomes an owner of that object and has a pointer to it.
6. Each object does its own job - and presents to the rest of the world - to other objects - and indeed in a sense to the programmer - an opaque wall whose only entrances are the methods to which it promises to respond and the actions it promises to per
will be ignored
new instances of the class or retrieve some global property of the class.
Core Graphics Framework
Encapsulation of functionality
7. Categories are an Objective C way to add _ to an existing class without subclassing
implementation
class's
super - self
methods
8. Views have three properties related to their location and size: @property _ _;
Model Objects[Factory Worker]
UIView
protocol
CGRect bounds - GCPoint center - CGRect frame
9. NSDictionary...
Hash table - Look up objects using a key to get a value.
initializer
copy - retain
class methods - initializers
10. The only reason to temporarily own an object - is...
to give it someone else - or another object
receiver - selector - arguments
nil
the array becomes an owner of that object and has a pointer to it.
11. NSString *s = @'Hello - World'; is an example of...
creating an initializer
creates an instance of NSString that holds the character string
is an instance of that class
declaration and initialization of a variable
12. Why properties?
is an instance of that class
dealloc - is called on the object & the object's memory is returned to the heap
safety - subclassability and makes code look more consistent with C structs
wait until the loop finishes processing the event - at the end release it
13. Prefixing a character string with an @ symbol [specific - NSString class]...
class methods - initializers
the array relinquishes ownership of that object and no longer has a pointer to it
Instantiation from scratch
creates an instance of NSString that holds the character string
14. A _ handles touch events.
Encapsulation of functionality
Maintenance of state
count - objectAtIndex - makeObjectsPerformSelector - sortedArrayUsingSelector - lastObject
view
15. @property - is using methods...
calling code that does the instantiation for you
to get and set variables
size and position
C Functionn
16. Archiving works by creating an instance of _ - which is essentially just a container for data - and placing objects and their data inside it.
NSCoder
ordered collection of objects - immutable
view controller's initialization method
references to objects
17. In a class method you cannot access...
instance variable of an object is valid
the instance variables
data source - delegate and view controller
position
18. The class is responsible for what instance variables the instance has - but not the _ of those variables.
new instances of the class or retrieve some global property of the class.
arguments[message]
rectangular
values
19. The object to which a message is sent - the receiver can be referred to as self from inside the method that is invoked
Encapsulation of functionality
designated initializer
receiver
NSBundle
20. NSDate - class...
initializer
Anytime you call a method with new - alloc or copy. You own and must release that object.
Core Graphics Framework
Used to find the time right now or to store past or future time/dates
21. Execution of the break statement...
causes the program to immediately exit from the loop it is executing - whether its for - while or do
Core Graphics Framework
Continue
instance of UIView or one of its subclasses
22. If a class declares a _ that is different from its superclass - you must override the superclass' _ to call the new _...
designated initializer
data source - view controller and delegate
they need to be defined in the implementation file
ordered collection of objects - immutable
23. UITableViewController is a subclass of...
NSBundle
UIViewController
Core Graphics Framework
viewWillAppear - viewDidAppear - viewWillDisappear & viewDidDisappear
24. Ready-made instances...
initializer
storage
calling code that does the instantiation for you
upper
25. When a view controller presents a modal view controller - the _ of the modal view controller is set to be the parent of the presenting controller
parentViewController
message
cannot be added to an array
pointer - class
26. We can use dot notation to reference...
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
27. SomeClass* aVariable = [[SomeClass alloc] init]; is an example of what kind of instance?
UIView
pointer to an object
a mechanism to enable specific callbacks
Instantiation from scratch
28. NSArray - class...
accessors - individually we call them 'getters' and 'setters'
ordered collection of objects - immutable
Is a placeholder object
Data Encapsulation
29. In Cocoa Touch - the table view asks another object _ what it should display...
variable scope - if defined within a block
pointer - class
its dataSource
initializer
30. A pointer to the object being asked to execute a method
copy - retain
@interface ClassName:SuperClassName
receiver[message]
parentViewController
31. When overriding a method - all you need to is _ - you do not need to declare it in the header file because it has already been declared by the superclass....
Generic object wrapper for other non-object data types
define it in the implemenation file
is an instance of that class
draw images
32. When an object is removed from an NSMutableArray - that object is sent the message release;...
viewWillAppear - viewDidAppear - viewWillDisappear & viewDidDisappear
receiver[message]
the array relinquishes ownership of that object and no longer has a pointer to it
size and position
33. In object oriented languages - we call methods that get and set instance variables
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
34. To load a Xib file manually - you use _
NSBundle
CGFloat
selector[message]
methods
35. A function in the objective c library that simply displays or logs it's argument
ready-made instances - instantiation from scratch - and nib based instantiation
NSLog routine
Encapsulation of functionality
instance variables
36. A view exists within a hierarchy. The window (an instance of UIWindow) is a view and the root of the hierarchy. It has _ (that appear on the window). Those views can also have _.
an object's property
creates an instance of NSString that holds the character string
parentViewController
subview(s)
37. id is a...
pointer to an object
its dataSource
receiver[message]
declaration and initialization of a variable
38. In Objective C - the name of a setter method is set plus the name of the instance variable it is changing - for example PossessionName would be...
declaration and initialization of a variable
alloc - singleton - informational utility method?
setPossessionName
Instantiation from scratch
39. After accessors have been defined in the header file...
self
accessors - individually we call them 'getters' and 'setters'
receiving and handling events that are associated with it
they need to be defined in the implementation file
40. C struct with a CGPoint origin and a CGSize size - in other words two c structs.
declaration and initialization of a variable
type - name and value
creating an initializer
CGRect
41. UIViewController has several methods that get called at certain times...
(id)initWithFrame:(CGRect)aRect;
define it in the implemenation file
Functions
viewWillAppear - viewDidAppear - viewWillDisappear & viewDidDisappear
42. Values to be supplied as the parameters to the method
safety - subclassability and makes code look more consistent with C structs
variable scope - if defined within a block
arguments[message]
delegates and dataSources
43. When you send a message to _ - you are sending a message to _ - but demanding that the search for the method begin at the superclass....
receiver - selector - arguments
draw images
methods for generating an instance
super - self
44. Hold data and know nothing about the user interface
callbacks
Model Objects[Factory Worker]
instance of UIView or one of its subclasses
view controller's initialization method
45. A callback is a function that is supplied in advance of an event - and...
method
is called every time the event occurs
'getters' and 'setters'
storage
46. Object Oriented based analogue to a function is called a...
designated initializer
CGRect bounds - GCPoint center - CGRect frame
has one root view controller
method
47. If you aren't going to initialize an instance reference pointer at the moment you declare it by assigning a real value - it's a good idea to assign it _.
nil
first responder
Object wrapper around primitive types like int - float - double - BOOl
define it in the implemenation file
48. Property List...
safety - subclassability and makes code look more consistent with C structs
You take ownership for an object you want to keep a pointer to
class methods - initializers
collection of collections - NSArray of an NSArray
49. In Objective C arrays can hold only...
Object wrapper around primitive types like int - float - double - BOOl
references to objects
header files declare
create a XIB file
50. Also - because arrays only hold a pointer to an object...
array[class - NSMutableArray]
a single-array can contain objects of different types
instance variable of an object is valid
%d