Drawing Builder in Objective-C

I am using to create an object using the builder pattern as shown below:

MyObject myObject = new MyObject.Builder()
    .setProperty1(property1)
    .setProperty2(property2)
    .setProperty3(property3)
    .create();

      

I'm new to Objective-C , especially iOS, and I'm wondering if this design pattern is actually used (since you need nested classes, static methods, etc.). If there is an equivalent design pattern I would like to explore it, or if it is used exactly as it is, I would like to give an example.

+3


source to share


1 answer


I can suggest you read the following article: http://www.annema.me/the-builder-pattern-in-objective-c



+3


source







All Articles