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
Define view object in iOS operating system?
What is delegation pattern in ios?
Do you know what is iphone reference library?
How do you usually persist data on ios? : IOS Architect
what does @synthesize do?
How to use core data objects between two threads?
how you can delete a smart group created in Xcode?
What are transient properties?
what are the source items used by Xcode?
What are all the newly added frameworks iOS 4.3 to iOS 5.0?
What is strong weak in ios?
Why iphone apps are popular?
What is uikit framework in ios?
what are the new features in Xcode 6?
Difference between categories and extensions?