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 do you know about home screen of ios?
Explain keywords alloc and new?
How do you check if your code has memory leaks?
What is called before viewdidload?
What is the difference between weak and strong?
An app is loaded into memory but is not executing any code. In which state will it be in?
What is uiwindow in ios?
Difference between cocoa, cocoa touch and objective c?
What is ios technology?
What is ipa?
What is xcode used for?
What is swift and what is objective-c?