Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Jakub Kusmierz
Jakub Kusmierz
6,808 Points

Adding UI Programmatically

I am working through the initial iOS material, and have a question about best practices in regards to how to create an app.

Amit goes through how to add the background image programmatically, but what are the arguments for and against adding UI elements this way as opposed to using the Storyboard?

1 Answer

Nathan F.
Nathan F.
30,773 Points

Actually, the Treehouse Blog has a nice little article about this: Sam Soffes wrote why he doesn't use Interface Builder. I don't know if this always applies, but I think a lot of iOS developers encourage doing things programmatically. Storyboard can still be useful for visualizing and prototyping applications, I think.

It's worth reading the comments as well, where some people give their reasons for why they like using Storyboards.