Speed Up your iOS Development: Demystifying complex UIViews using Decorators

Pieces of advice to create complex views, reusing a simple layout

Implementing our features based on the designs

From the left to the right: Your birthdate View, Favorite Music View, Friend requests view
Very generic UITableViewCell composed by a single UILabel

Discovering the power of the NSAttributedString

Simplify the layout

Layout composition of the generic UITableViewCell with one single UILabel

Reuse the same layout along with multiples views

Decorator

Move the logic as much as you can to the Decorator

Final Results

AttributedModule with 3 different cells reusing the same view layout

Conclusions

Flawless iOS

🍏 Community around iOS development, mobile design, and marketing

Francisco Javier Trujillo Mata

Written by

iOS Developer. Developing with modules is wonderful. Ready to preach the marvellous world of Modules. Learning the PS2Dev as well. https://github.com/fjtrujy

Flawless iOS

🍏 Community around iOS development, mobile design, and marketing