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 difference between 'assign' and 'retain' keyword?
What is the use of controller object UIApplication?
What is cocoa framework in ios?
what are all instruments available in Xcode?
What is UICollectionView ?
What are the delegate methods of mkmapview?
Will iphone 7 get ios 13?
Assume that an app is not in foreground but is still executing code. In which state will it be in?
Explain @synchronized ,@dynamic
What is fast enumeration?
When a nsfetchrequest fetches an entity object from store, does it fetch all of its data at once?
how you can delete a smart group created in Xcode?