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 accessibilityhint?
What is framework in ios?
What is the short cut to open the “Code Snippet Library” in Xcode?
How do I get rid of app errors on iphone?
What is a thread in ios?
What’s the difference between not-running, inactive, active, background and suspended execution states?
What is the use of double question marks (“??”) ?
How do you check if your code has memory leaks?
Who calls the main function of you app during the app launch cycle?
Explain Apple push notification
What is a difference between stack and heap memory?
Explain difference between sax parser and dom parser?
What is ios viewdidload?
Is realm db free?
What are the requirements for developing iphone apps?