The many ways of iOS

After spending time refactoring a large legacy app, I’ve come to recognize a fact about iOS: it’s TMTOWTDI as heck. Think about how many ways there are to put a UIButton on screen. While I’m generally against TMTOWTDI in languages, it’s manfestation on iOS is one of careful progress rather than glib overcomplication. iOS is a flexible platform and It’s interesting how many different ways there are to accomplish something; each with their own purpose and tradeoffs.

Layout

Consider placing a control on the screen at programmer defined coordinates.

Creatiing a UI

Object Coupling

(I’m sure I forgot others, coupling and cohesion within OO languages is a vast topic.)

Animations

Data Persistence

Go it alone

In every area presented, there is enough low-level functionality exposed within the framworks for a developer to write a completely custom solution if desired. Maybe you have a better idea for a persistence framework or a new way to model UIView layout? Before running off to re-implement UIKit (poorly), I recommened getting to know the whys and hows of solutions presented above. In many cases, a solution can be found by tweaking and combining several technologies in a novel way.

What other areas does iOS offer varying ways to do things? Would love to hear from the community on areas I’ve passed over.