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
When an app is said to be in active state?
What is block in ios swift?
How can you enable client certificate in ios 12? : IOS Architect
What is meaning of 'retain' keyword?
What is iphone os?
What is thread in ios?
What is the difference strong and weak reference?
What is difference between category and extension in ios?
What is push notification?
What is core data in ios swift?
What is block in ios?
How we can wait for some thread to finish before starting another?
What is spritekit and what is scenekit?
What is difference between weak and strong in ios?
When a nsfetchrequest fetches an entity object from store, does it fetch all of its data at once?