Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Single Source

 
Pat Moran
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Brandon, Christopher, and Shannon:

My question is this: Is it relatively straightforward to write a single piece of source code that can work effectively on both the iPhone and iPad? If so, would the best approach be a single build or separate builds for each target environment?

Thanks.

Pat
 
Alaa Nassef
Ranch Hand
Posts: 471
Hibernate Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's easy. You'll just have to have separate XIB files for the different resolutions, and separate app delegates. In my apps, what I do is create a base application delegate and a base controller, and those have the common functionality. I extend those classes, and create a 2 different controllers with their XIB files (one for iPhone and one for iPad).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic