How to port an app from old iPhone to iPhone 4? (Retina Display) - iphone

Sorry if im asking something stupid but please dont shoot me down!
I have done a little playing in xcode but nothing more than a button press counter kindof thing..
I was curious.. when developing with the retina display in mind you obviously produce higher resolutions png's and what not for the new display..
How would you go about making the app run on a lower resolution iPhone?
Would you use the same high res graphics and have the OS do the rest of the work or do you need to write in a chunk of code to switch the graphics based on the device?
Again sorry if its in the documentation but i couldnt find it!
Thanks in advance..
Daniel

You want to read the iOS Application Programming Guide.
Especially Supporting High-Resolution Screens.

Related

Making my iPhone 5 app compatible with iPhone 4, iPod Touch, legacy iPhone?

I am new to xcode and mobile app design in general, but was able to pull together some resources and make a nice looking app optimizing for iPhone 5. However, I noticed a few problems with compatibility and am hoping someone can suggest to me a quick fix.
First, I take advantage of the entire iPhone 5 screen size, and when loaded on iPhone 4 or earlier the placement of icons is all awry. Would this be fixed by just making the entire view scrollable somehow? And if so, can someone point me in the right direction to accomplish this?
Second, I've noticed that if I am using my app while in a call (and therefore have the green notification bar at the top) it also causes misalignments for my objects. Is there a way to prevent this?
Thanks for the advice.
If you are targeting iOS 6 you should take advantage of Auto Layout. Here is a good tutorial to get started http://www.raywenderlich.com/20881/beginning-auto-layout-part-1-of-2
Add a Default-568h#2x.png launch image.
and check the all screen.

How to migrate existing iphone application to iphone 5 screen resolution as well?

I have my existing application, I want to migrate these application to iPhone 5 resolution as well, I tried lot of links regarding these problem, I haven't get clear idea about actually to migrate the application, Please give the idea, regarding these problem.
I referred following link as well but haven't get clear idea about these problem....
How to develop or migrate apps for iPhone 5 screen resolution?
From above link I done with splash screen, but the remaining nib ui height not proper, in some screen, above will get more space and in some below space is more, SO how to solve these prob, please help me.
Are you going to support iOS 5 or earlier? If not, I recommend learning about Autolayout. With this feature, you can set up constraints that will ensure layouts between the devices appear similar (with just a little more room for your views).
First, read this to learn about the recommended usability recommendations for different devices (scroll down to the "Running on iPhone 5" section): http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/mobilehig/TranslateApp/TranslateApp.html
Then, for Autolayout check out this WWDC video:
Introduction to Auto Layout for iOS and OS X

iPhone VS ipad development process (differences and similarities)

I am new to iOS development. I am trying to figure out these things.
A project both in iPhone and iPad. what things are same for both (coding, graphics or UI)?
Design Pattern of apps are same or different?
waiting for answer
Thanks :)
Personally, I find that the only real difference between the iPhone and the iPad is the UI and UX. Most of the code is the same for both applications. (In fact, you can even reuse a lot of code if you are doing a universal app!)
The main difference really is the screen size. The iPad is huge in comparison to the iPhone, and this difference gives you a lot more options to work with.
Another thing to note is that the iPad is usually done in landscape orientation, whereas the iPhone is done in portrait. This is not an absolute rule however, it's just the way I see it.
The graphics aren't too different between the devices, except that because of the large screen size, you can do a bit more detailed work with the iPad images then the iPhone images. (Even with the retina display, too fine detail on the iPhone is barely noticeable.)
The other thing I wanted to mention is the flow of the devices. Again, because of the screen size of the iPad, you can fit a lot more content on the screen, and therefore have to push to new views less frequently. I've worked on apps where we had 3 UIViewController's for the iPhone version, and only 1 for the iPad version.
In short, it depends really on your type of app. If you have a lot of content, and want to display it all at once, go for the iPad. If you want a streamlined, minimal approach to your app, go for the iPhone.
Again, this is all just my personal opinion. Hope that Helps!
You can use native controls without much theming and customization on the iPhone. But iPad is a bigger beast. Users use your iPad app for a longer time. iPhone apps are used for a short stint and then closed, used again for a short stint and so on.
Analytics published by Flurry showed that the average time an iPhone app is kept open is about 1.2 minutes. Design and develop it in a way that data is available as fast as you can.
iPad apps are used in a relaxed setting. While I don't have the numbers, it's probably used more often and for a longer time than an iPhone app. Themes and custom UI elements do matter a lot there
Second, iPad apps need to be supported on all orientation (or at least a minimum of two orientations)

How to make iPad use the #2x.png high res images in "2x" mode

I've read the documentation and googled until I couldn't google anymore, but still I cannot figure out how to make my iPhone app use the higher resolution images when displayed in "2x" mode on the iPad.
I have Icon.png Icon#2x.png and Icon-72.png and they work fine, but I don't want to have to rename all of my images. Also, the "2x" just seems to scale up pixels so text and IB objects look terrible. Is there a fix for this? Any suggestions would be greatly appreciated!
Note: This is not a universal app. I don't want to make it into a universal app. I just want it to scale up and look pretty on the ipad.
It is possible, at least in Cocos2D apps. Matt Rix does exactly this in his app Trainyard and it looks great on the iPad at 2x! He covers some of the details on his blog: Retinafy your Game.
Apple want you to write native iPad apps, so they deliberately don't support this, and there's no way to make it happen that I'm aware of.
You can register for the notification _UIClassicApplicationWillChangeZoomNotificationName and scale your graphics appropriately, i.e. by setting the rasterizationScale on the CALayer to the value returned by [[UIScreen mainScreen] scale].

How will I have to update how I program for iPhones now with iOS4?

For example, preparing a launch screen of 320 x 480 would have to be changed....
How is that going to work for us? Are programmers always going to have to be submitting a high-res that will be scaled down for old devices such as the iphone 3g?
The size of the screen is basically 4 times on a pixel by pixel basis. So each pixel of your image for example gets boosted to 4.
What this means for you? You don't have to change your App, your app will scale to the hi res screen for you, same with your UI and images within your UI. Of course if you want to take advantage of the better screen quality you will have to submit hi res images.
I haven't looked at going the other way but I believe it would be a similar case.
One exception to this is text. It automatically scales to the higher res for you for free. So text will look super sharp. One problem with this is if your loading image has text based on the original load screen that wouldn't look the same as when the high res text loads.
Strictly speaking, anyone who's seen the documentation on how they're handling this is still under non-disclosure until Monday, when the new iOS ships.
Suffice to say, it's clever. You'll be able to put both high and low-rez versions of ALL your images into your app, and then load them into your app in a way that's totally transparent from the code side. The device will make its own call about which version of the image is appropriate for the kind of screen it's got.
Now that the WWDC 2010 videos are available for free to any registered iPhone developer (or ADC member), I recommend watching Session 134: Optimize your iPhone App for the Retina Display for a full description of what you need to do to support the iPhone 4's new display.