Search code examples
xcodexcode4ios-universal-app

universal application weight


I developed my app for Ipad, now I should adapt it for Iphone. My app is quite heavy with a lot of images that should be available offline. These images are located in xib files and are sometimes loaded dynamically from app bundle. I need to limit the size of my app.

  1. should I make a universal app or two different apps (each one with its own set of images optimized for the device)?
  2. If I do a single universal app can I dynamically resize my "dynamically loaded images" in code. what should I do for the images in xibs?

Solution

  • I finally found my answer, one app with different xib sharing the same view controllers. To limit the weight :

    • Some images must be modified (eg: backgrounds) because they need to be adapted to the iphone screen resolution. I just named them image~iphone.png. The cool thing is that you dont need to modify images'name in xib or code because the ~iphone signifies image for the iphone.

    • Some others can remain the same (eg: buttons) and I'll just size them down in the IB.