What is factory methods ? What is the advantage of using it ?
Answer Posted / 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 |
Post New Answer View All Answers
What’s the difference between mkannotation and mkpointannotation?
Which compiler is used by ios? : IOS Architect
Define content offset?
Explain the difference between 'protocol' and 'delegate'?
What is viper code?
How does the runtime handle message passing? What is message forwarding?
What does ios mean on my iphone?
What does ios stand for apple?
Explain alamofire benefits
How can you enable client certificate in ios 12? : IOS Architect
Explain about Viewcontroller lifecycle.
What's the latest version of ios?
Is viewdidload only called once?
How is retain different from assign?
Is react native easy?