aspose file tools*
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Mobile » iOS
Bookmark "Single Source" Watch "Single Source" New topic
Author

Single Source

Pat Moran
Greenhorn

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?

Thanks.

Pat
Alaa Nassef
Ranch Hand

Joined: Jan 28, 2008
Posts: 460
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: http://jnassef.blogspot.com/
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Single Source