mercredi 20 juillet 2016

What are good practices for implementing reusable screens in objective-c/cocoa?

I maintain an iOS app, where lot's of screens look similar. For ex. they have a title and subtitle label and image and a button at the bottom. The only thing that changes are the texts, colors, font sizes, image content, etc.

What are some good practices to implement generic all in one screens? I create a xib and a parametrized view model for it.

Another option that came to my mind is to make a generic table view and table view cells (xibs) for say, button, label, text+switch, and construct a custom screen with view models of these cells.

Is this a good practice? Are there any others?

Aucun commentaire:

Enregistrer un commentaire