It's not a secret anymore!
The moose likes iOS and the fly likes Single Source Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » iOS
Bookmark "Single Source" Watch "Single Source" New topic

Single Source

Pat Moran

Joined: Feb 11, 2004
Posts: 20
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?


Alaa Nassef
Ranch Hand

Joined: Jan 28, 2008
Posts: 471

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).

Visit my blog:
I agree. Here's the link:
subject: Single Source
It's not a secret anymore!