Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Sep 21, 2012, 12:01 PM   #1
DDustiNN
macrumors 6502a
 
Join Date: Jan 2011
How to update my app for iPhone 5's screen, simple list view

Hello, I'm hoping someone could help me. My app is a simple list view (like the stock Contacts app), so I assumed it would automatically just stretch to the larger screen size (thus showing a couple more lines of the list), since I used a built-in view type from the API.

I just got my iPhone 5, downloaded my app, and it is letterboxed onto a 3.5" screen. So I was obviously wrong.

I guess I'll have to put in an update, but... what do I update? What do I have to do to tell my app to display properly on the taller screen? Do I have to check for screen size and change something accordingly? Or is it just something simple I overlooked? I mean, is it a setting somewhere, or do I have to actually modify the code?

Thanks guys

Last edited by DDustiNN; Sep 21, 2012 at 11:38 PM.
DDustiNN is offline   0 Reply With Quote
Old Sep 21, 2012, 12:17 PM   #2
dejo
Moderator
 
dejo's Avatar
 
Join Date: Sep 2004
Location: The Centennial State
First, you will need to add a Default-568h@2x.png image to your Launch Images. Then, you should run your app in the Simulator and see if your view(s) resizing are properly set up to handle the larger screen.
__________________
dejo is offline   0 Reply With Quote
Old Sep 21, 2012, 12:21 PM   #3
DDustiNN
Thread Starter
macrumors 6502a
 
Join Date: Jan 2011
Quote:
Originally Posted by dejo View Post
First, you will need to add a Default-568h@2x.png image to your Launch Images. Then, you should run your app in the Simulator and see if your view(s) resizing are properly set up to handle the larger screen.
I haven't looked at Xcode in quite a while so I'm not 100% familiar with what that image is. Is that the splash screen that's displayed on app startup? I do have one of those. Are you saying I should have two different sizes of that screen, and then the app will automatically adjust everything else accordingly because it will choose the appropriate screen size on startup?

Just want to make sure I'm understanding correctly. Thanks for the response!
DDustiNN is offline   0 Reply With Quote
Old Sep 21, 2012, 12:42 PM   #4
dejo
Moderator
 
dejo's Avatar
 
Join Date: Sep 2004
Location: The Centennial State
Quote:
Originally Posted by DDustiNN View Post
Are you saying I should have two different sizes of that screen, and then the app will automatically adjust everything else accordingly because it will choose the appropriate screen size on startup?
Actually, you should have three different sizes: 320x480 (for non-retina iPhone), 640x960 (for retina iPhone) and 640x1136 (for retina 4-inch iPhone). And if your app is universal, you'll have even more startup images for the iPad.

If the 640x1136 image is set properly, your app will run without letter boxing. As for whether it will "automatically adjust everything else accordingly", that all depends how you have the autoresizing, etc. setup for all your views.

You should get the latest Xcode and do some testing. It's kinda what developer previews are intended for.
__________________
dejo is offline   0 Reply With Quote
Old Sep 21, 2012, 12:45 PM   #5
R4z3r
macrumors member
 
Join Date: Jan 2009
Location: NJ
Quote:
Originally Posted by DDustiNN View Post
I haven't looked at Xcode in quite a while so I'm not 100% familiar with what that image is. Is that the splash screen that's displayed on app startup? I do have one of those. Are you saying I should have two different sizes of that screen, and then the app will automatically adjust everything else accordingly because it will choose the appropriate screen size on startup?

Just want to make sure I'm understanding correctly. Thanks for the response!
Phone-only applications may only have one launch image. It should be in PNG format and measure 320 x 480 pixels. Name your launch image file Default.png.

For iPhone 4 high resolution, you can include an additional launch image. It should be in PNG format and measure 640 x 1136 pixels. Name it Default@2x.png. This image will get picked up by the iOS if your app is running on an iPhone 4.

For iPhone 5 high resolution, you can include an additional launch image.it should be in PNG format and measure xxx x xxx pixels. Name it Default-568h@2x.png. This image will get picked up by the iOS if your app is running on an iPhone 5
R4z3r is offline   0 Reply With Quote
Old Sep 21, 2012, 12:52 PM   #6
DDustiNN
Thread Starter
macrumors 6502a
 
Join Date: Jan 2011
Quote:
Originally Posted by dejo View Post
Actually, you should have three different sizes: 320x480 (for non-retina iPhone), 640x960 (for retina iPhone) and 640x1136 (for retina 4-inch iPhone). And if your app is universal, you'll have even more startup images for the iPad.

If the 640x1136 image is set properly, your app will run without letter boxing. As for whether it will "automatically adjust everything else accordingly", that all depends how you have the autoresizing, etc. setup for all your views.

You should get the latest Xcode and do some testing. It's kinda what developer previews are intended for.
Quote:
Originally Posted by R4z3r View Post
Phone-only applications may only have one launch image. It should be in PNG format and measure 320 x 480 pixels. Name your launch image file Default.png.

For iPhone 4 high resolution, you can include an additional launch image. It should be in PNG format and measure 640 x 1136 pixels. Name it Default@2x.png. This image will get picked up by the iOS if your app is running on an iPhone 4.

For iPhone 5 high resolution, you can include an additional launch image.it should be in PNG format and measure xxx x xxx pixels. Name it Default-568h@2x.png. This image will get picked up by the iOS if your app is running on an iPhone 5
Thanks guys, this was helpful. I'll do that over the weekend and look into the auto-resizing thing.

Thanks again
DDustiNN is offline   0 Reply With Quote
Old Sep 23, 2012, 03:15 AM   #7
DDustiNN
Thread Starter
macrumors 6502a
 
Join Date: Jan 2011
Well that was simple. I downloaded the new Xcode, and it seems that adding the Default-568h@2x.png launch image has done the trick... tested out perfectly in the simulator. Now it's just waiting for review in the App Store.

On another note, it looks like I was forced to drop support for armv6, and I had to bump up my minimum supported version to iOS 4.3... bummer, for such a simple app.

Thanks for the help guys
DDustiNN is offline   0 Reply With Quote
Old Sep 23, 2012, 10:04 AM   #8
xStep
macrumors 68000
 
Join Date: Jan 2003
Location: Less lost in L.A.
Quote:
Originally Posted by R4z3r View Post
For iPhone 4 high resolution, you can include an additional launch image. It should be in PNG format and measure 640 x 1136 pixels. Name it Default@2x.png. This image will get picked up by the iOS if your app is running on an iPhone 4.
That 1136 is wrong for iPhone 4. That is the height for iPhone 5. dejo listed them.

----------

Quote:
Originally Posted by DDustiNN View Post
Well that was simple. I downloaded the new Xcode, and it seems that adding the Default-568h@2x.png launch image has done the trick... tested out perfectly in the simulator. Now it's just waiting for review in the App Store.

On another note, it looks like I was forced to drop support for armv6, and I had to bump up my minimum supported version to iOS 4.3... bummer, for such a simple app.

Thanks for the help guys
Did you test on several devices or several simulator resolutions at least? Simply adding the image tells iPhone 5 what resolution to use. It can't account for other issues like resizing views, and the rotation issue that has been mentioned here a couple of times.

If you have kept an older version of Xcode handy, potentially you could use that to compile an armv6 binary and use a command line tool, lipo I think, to combine with the other the newer binary. I'm not sure how that would all work or if it is really possible with the store destined package. Might be a very big hassle.

BTW, what is the app?
__________________
My App: CameraTime - Time lapse photography for novice and advanced users.
xStep is offline   0 Reply With Quote
Old Sep 23, 2012, 10:14 AM   #9
R4z3r
macrumors member
 
Join Date: Jan 2009
Location: NJ
Quote:
Originally Posted by xStep View Post
That 1136 is wrong for iPhone 4. That is the height for iPhone 5. dejo listed them.
Sorry, copied from over an area of developer.apple.com. Your right though, should have said:

Device:
iPhone and iPod touch
320 x 480 pixels
640 x 960 pixels (@2x)

iPhone 5 and iPod touch (5th generation)
640 x 1136 pixels (@2x)

iPad
768 x 1004 pixels
1536 x 2008 pixels (@2x)

iPad Landscape
1024 x 748 pixels
2048 x 1496 pixels (@2x)
R4z3r is offline   0 Reply With Quote
Old Sep 23, 2012, 12:07 PM   #10
DDustiNN
Thread Starter
macrumors 6502a
 
Join Date: Jan 2011
Quote:
Originally Posted by xStep View Post
Did you test on several devices or several simulator resolutions at least? Simply adding the image tells iPhone 5 what resolution to use. It can't account for other issues like resizing views, and the rotation issue that has been mentioned here a couple of times.

If you have kept an older version of Xcode handy, potentially you could use that to compile an armv6 binary and use a command line tool, lipo I think, to combine with the other the newer binary. I'm not sure how that would all work or if it is really possible with the store destined package. Might be a very big hassle.

BTW, what is the app?
Yeah I tested on all 3 iPhone resolutions.

I found an armv6 workaround online, tried it out but it was quite a hassle and still giving me errors, so I just switched it back to armv7 and iOS 4.3, then it worked perfectly. I noted that change in the update too, so that anyone using an old device (iPhone 3G, iPod Touch G1 or G2) or iOS 4.2.6 or lower should not update.

My app is called Mortal Kombat Pocket Guide. I just made it as a school project last year and to learn the basics of iOS development. Figured I'd put it on the store to make my $100 back, but it still sells a surprising amount considering there are better ones. In fact I bought a different one and use that personally, lol. I even emailed the guy and told him, and we went back and forth for a bit as he told me some cool stuff about how he made his.

Anyway, that app has already paid for my developer license last year and this year, plus quite a bit of profit, so now I want to make some more. I have ideas for some apps I want to do, just gotta find the time!

Quote:
Originally Posted by R4z3r View Post
Sorry, copied from over an area of developer.apple.com. Your right though, should have said:

Device:
iPhone and iPod touch
320 x 480 pixels
640 x 960 pixels (@2x)

iPhone 5 and iPod touch (5th generation)
640 x 1136 pixels (@2x)

iPad
768 x 1004 pixels
1536 x 2008 pixels (@2x)

iPad Landscape
1024 x 748 pixels
2048 x 1496 pixels (@2x)
Yep I got it, knew what you meant, haha. Actually Xcode tells you what the resolution should be when choosing your images too, so no confusion here

Last edited by DDustiNN; Sep 23, 2012 at 01:44 PM.
DDustiNN is offline   0 Reply With Quote
Old Sep 24, 2012, 09:06 PM   #11
ahan.tm
macrumors regular
 
Join Date: Jun 2011
Location: Florida
Have you taken a look at Auto-Layout? Ray Wenderlich has a good tutorial part of their iOS6 feast.
__________________
Parenting just got easier: Check out iBehave on the app store!
ahan.tm is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Introducing ShopIt - simple and handy shopping list iPhone app ShopIt iPhone and iPod touch Apps 1 Oct 3, 2013 07:40 AM
Lock screen-today view-calender. List view? starstreak iOS 7 5 Sep 18, 2013 09:39 PM
List+, a simple todo list + reminder app (promotion codes) bnfan iPhone and iPod touch Apps 12 Dec 24, 2012 02:02 PM
Simple Movie List app with Ignore? Rufuss Sewell iPhone and iPod touch Apps 0 Dec 10, 2012 12:23 AM
List Buddy 2.4: The best list making app receives a major update Holosynthetic iPhone and iPod touch Apps 0 Jun 13, 2012 11:19 AM

Forum Jump

All times are GMT -5. The time now is 11:36 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC