Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

iOS

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.