Hacker News new | past | comments | ask | show | jobs | submit login

I'm an iOS developer and I generally do what you suggest here. I create a bunch of subclasses of UIView and do my positioning via layoutSubviews, implement sizeThatFits when appropriate, etc.

Despite this I feel like Apple makes it very difficult to keep all UI code out of your view controllers. I'd go as far to say they actively encourage shoving UI code into your UIViewControllers. Take a look at the interface for UIViewController -- it is almost all view/presentation related [0]. Most of Apple's sample code and projects have view code sprinkled all over their UIViewControllers.

I feel like it is a constant fight to keep proper view/controller separation on the iOS platform.

[0] http://doing-it-wrong.mikeweller.com/




most of apples sample code is pretty poor design for large projects, the biggest example I think is core data stack in the app delegate




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: