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
Can python apps run on ios?
What is meaning of 'nonatomic' keyword?
What is arc ? How it works?
What is main thread checker?
Explain how an autorelease pool works at the runtime level
How do you check if your code has memory leaks?
What are the lifecycle events of uiviewcontroller?
Can a static library (.a) contain assets like pictures, sound documents and so on.?
Explain the difference between nsarray and nsmutablearray?
What are the benefits of ios?
What is push notification?
What are the 7 osi layers?
What is onboarding and why is it so important for mobile design? : IOS Architect
What is difference between delegate and datasource in ios?
What is view object in ios?