Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Can we support the same application for iphone 3gs and iphone 5, 6, 7? Why not?

773


How can we achieve singleton pattern in iOS?

857


How to de-symbolicate crash log?

775


How do I create a class in xcode?

890


what are fetched properties? How do you create a fetched property?

812


How to animate view with constraint?

782


Who is the developer of ios?

809


Explain how to shut off message alerts in ios?

752


What is a weak var?

851


What is ios realm?

884


How to use reusable cell in uitableview?

939


What is storyboard?

863


Define iterator protocol?

826


What is strong in ios?

793


Difference between iOS 3 , iOS4, iOS 5, iOS 6, iOS 7 and iOS 8 (What are the new features)

1562