What is factory methods ? What is the advantage of using it ?
Answer / babu
Class factory methods are implemented by a class as a convenience for developers. These methods combine allocation and initialisation in a single step and return the created object.
NSDate:
Eg: + (id)dataWithBytes:(const void *)bytes length:(unsigned)length;
NSDictionary
Eg:+ (instancetype)dictionary;
| Is This Answer Correct ? | 0 Yes | 0 No |
What is foundation framework in ios?
. How do you change the content of your app in order to change the views displayed in the corresponding window?
What are the Steps for using coredata?
What is arc in ios?
How do I exit safe mode on my iphone?
Explain "private", "protected" and "public"?
Explain the difference between 'protocol' and 'delegate'?
How do I get rid of app errors on iphone?
What is the difference between atomic and nonatomic properties? Which is the default for synthesized properties?
Which are the ways of achieving concurrency in ios?
What is made up of nserror object?
Which framework delivers event to custom object when app is in foreground?