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
Explain ios multitasking?
What are the application lifecycle in ios?
What does exc_bad_access mean?
What is mvp in ios?
Define autorealease pool?
What is the maximum byte-size for a push notification to apple server?
How to send your device id to an iphone developer?
What is the difference between weak and strong?
What is Automatic Reference Counting (ARC) in iOS operating system?
What is fast enumeration?
Explain about the applications that can be used with iphone ?
How do you stop apps running in the background on ios?
Explain ~/documents, ~/library, ~/tmp. What directory is ~ on ios?
Does ios support multitasking?
What is concurrency in ios?