Answer:-
There are 3 ways to represent a null value in Objective-C.
Nil -> Absence of value with Objective-C object variables.
Null -> Absence of value with C- style pointers.
NSNULL ->A nil boxed as an object for storage in a collection.
Explain the difference between NSOperationQueue concurrent and non-concurrent?
Answer:-
In the context of an NSOperation object, which runs in an NSOperationQueue, the terms concurrent and non-concurrent do not necessarily refer to the side-by-side execution of threads. Instead, a non-concurrent operation is one that executes using the environment that is provided for it while a concurrent operation is responsible for setting up its own execution environment.
What is advantage of categories? What is difference between implementing a category and inheritance?
Answer:-
You can add method to existing class even to that class whose source is not available to you. You can extend functionality of a class without subclassing. You can split implementation in multiple classes. While in Inheritance you subclass from parent class and extend its functionality.
Difference between categories and extensions?
Answer:-
Class extensions are similar to categories. The main difference is that with an extension, the compiler will expect you to implement the methods within your main @implementation, whereas with a category you have a separate @implementation block. So you should pretty much only use an extension at the top of your main .m file (the only place you should care about ivars, incidentally)
There are 3 ways to represent a null value in Objective-C.
Nil -> Absence of value with Objective-C object variables.
Null -> Absence of value with C- style pointers.
NSNULL ->A nil boxed as an object for storage in a collection.
Explain the difference between NSOperationQueue concurrent and non-concurrent?
Answer:-
In the context of an NSOperation object, which runs in an NSOperationQueue, the terms concurrent and non-concurrent do not necessarily refer to the side-by-side execution of threads. Instead, a non-concurrent operation is one that executes using the environment that is provided for it while a concurrent operation is responsible for setting up its own execution environment.
What is advantage of categories? What is difference between implementing a category and inheritance?
Answer:-
You can add method to existing class even to that class whose source is not available to you. You can extend functionality of a class without subclassing. You can split implementation in multiple classes. While in Inheritance you subclass from parent class and extend its functionality.
Difference between categories and extensions?
Answer:-
Class extensions are similar to categories. The main difference is that with an extension, the compiler will expect you to implement the methods within your main @implementation, whereas with a category you have a separate @implementation block. So you should pretty much only use an extension at the top of your main .m file (the only place you should care about ivars, incidentally)
No comments:
Post a Comment