Start learning with our library of video tutorials taught by experts. Get started
Viewed by members. in countries. members currently watching.
In iPhone SDK: Developing iPad Applications, author Simon Allardice shows developers how to apply their existing knowledge of Xcode, Objective-C and the iPhone SDK to create applications for the iPad. The course focuses on what's different on the iPad, including design principles for the larger screen real estate, detecting device capabilities, and working with new Xcode project types. Exercise files accompany the course.
If we support application launching in both portrait and landscape mode, we should have at least two launch images one for each orientation. In fact with the iPad, you can actually provide four launch images, one for every version of the orientation including Landscape Left, Landscape Right, Portrait and Portrait Upside Down, but I'm only going to do two, which are the ones I need. So, I'm going to use Fireworks. You can use any image editor you want. The first one, let's make the landscape launch image which would be 1024 pixels wide by 748 pixels high.
Even though the screen is 768 pixels, we need to take it back down 20 to hold the status bar. I'm just going to create something here quite generic, so we can tell the difference between the launch in landscape and launch in portrait mode. So, I'll do a rather annoying color to make sure it's obvious, add a little bit of text and for our purposes here I can save this. So, I'll hit Save As, I'm going to save it out to my Desktop here and I'll call this one Default-Landscape and the name does matter.
We want to make sure it's an uppercase D and uppercase L, separated by a dash. I'm going to save this from Fireworks as a Flattened PNG. Fireworks PNG would probably be just fine, but I like to do it this way. Then I'm going to change the size of the Canvas around here. So that in this case, it's 768 pixels wide by 1004 pixels high, again going from 1024 and subtracting 20. We'll resize the background, change the color of it and change the text.
Obviously, here I'm not worrying too much about how good this looks. I just want it to be obvious. So, now I'll save this one. Saved as Default-Portrait. Again if you wanted, separate launch images for all orientations, you could save them as Default-Portrait and then Default-Portrait upside down, Default-Landscape left, Default- Landscape right, but I think these will be fine for us. Click Save. While I'm here, I might as well also create an application icon, so that we can tap it when we're launching our application from the iPad.
So to do that, I'll make another new image. this time I'll make it a 72 by 72 image, as opposed to the iPhone, which is 57 by 57. The application icon, like with the iPhone, you don't have to worry about creating the rounded corners and the shine. That will be added automatically by Apple. So I'll just do another simple thing here. I'll just have a yellow background with a random graphic in there. And then I'll save this one. The name of this isn't quite so important, because we get to specify it ourselves, but I'm going to take a leaf out of Apple's book and call it the iPadAppIcon.png, saving that as a Flattened PNG, click Save.
I'm going to quit out of Fireworks, so I now have my three images here on my Desktop. If I open up Xcode, what I need to do is take my three images here and drag them over into my Resources folder, making sure to drag them on top of the folder, making sure this checkbox to copy the items is selected, and click Add, So they're all in there. Now, one thing I do want to do is go to my PLIST file, because this is where we have the listing for the Icon file. Now, if I had a more complex application, one that was also having a iPhone version and I wanted to provide even more icons.
So that I had a settings bundle for example, or if results from my application showed up in Spotlight, I could add even more things here, but I'm going to do the very basics. So I'm going to name the icon I had for my application icon, which was iPadAppIcon.png. I don't need to name Default- Landscape and Default.Portrait, because those are the expected names. I'm going to save this and click Build and Run, and it seemed to be working there.
I saw a glimpse of blue. We'll try that again for sure, launching it in portrait mode. We're getting the blue portrait launch image. If I hit my Command+Left Arrow to switch to landscape mode, back out, we're launching with our landscape image. And I can see if I zoom it in here that it also seems to be correctly using my image that I created for the application icon and we've got the rounded corners added and the shine have been added automatically. Now, the guidelines are still that your launch images should resemble the first screen of your application. You will see launch images used as splash screens quite often, but the official guidelines from the Apple Human Interface Guidelines say that your launch images should resemble the actual first screen that you see of your application and if you look at what Apple will do, that's typically the case with them.
So, while there are other icons we can create, such as supporting Spotlight and supporting our application showing up in the Settings pane, if we want to do that, but these are the three icons that are effectively required for every iPad application.
Find answers to the most frequently asked questions about iPhone SDK: Developing iPad Applications.
Here are the FAQs that matched your search "":
Sorry, there are no matches for your search ""—to search again, type in another word or phrase and click search.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.