change ipad applications to iphone applications [duplicate] - iphone

This question already has an answer here:
Closed 10 years ago.
Possible Duplicate:
Convert ipad application to iphone. Universal app
I created one application which is iPad application. I want to change this iPad applications to iPhone applications.For that I change my application in universal. But the size of images,buttons etc are the same. Can I change my application to iPhone app? How can I do that? Or Is it necessary to create another application for iPhone? Can you give a solution for that? Please help me?

You can create another target from the first one (right click on the existing target and duplicate).
Concerning the frames of your views (label, buttons, etc...), it will depend of the way you've created them. If you've sized and placed them regarding the size of the screen, it should be ok.
Concerning your images, the best is to re-design them specially for the iphone target

Related

going from Iphone to ipad

I've created full app for iPhone, but I need to make iPad version. mostly the app is lists, but login screen, logo and cells are too small (just to repeat - it was created for iPhone). Is there any way to create iPad user interface or stretch phone views?
Thatnks for your help. Btw sorry if it's duplicate of some similar question. Just couldn't find it (maybe bad keywords).
You absolutely should have separate XIBs for iPad & iPhone. Now, if you want to try and save some work and start from the iPhone XIBs as your base point, you should take a look at the top two answers from this question:
Xcode 4 .xib Create iPad Version

app compatibility with iphone 5 screen size [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to detect iPhone 5 (widescreen devices)?
Do any adjustments need to be made for an app started in development prior to the iphone 5 in order for them to work on the iphone 5's larger screen?
If so, what are these changes, or where can I find what to change? google hasn't been too helpful so far.
Thanks
After adding the Default-568h#2x.png launch image, follow the steps outlined in this post:
How to develop or migrate apps for iPhone 5 screen resolution?
If you are having issues with the images being used INSIDE the app, and you want to support iPhone 5 and pre-iPhone 5 devices, use this:
Dealing with different size images in a xib for iPhone5 versus iPhone4?
You need to add a default launch images with 640x1136px named Default-568h#2x.png to support the iPhone 5 screen.
First, you have to have a 640x1136 launch image (with -568h#2x.png suffix) to make it compatible with the iPhone 5, but to fully make use of the larger screen, there are a many ways to do it. I find the easiest way to do it is to make two separate storyboards, making a new one for the iPhone 5, while maintaining the one you have already used for the iPhone 4S, 4, etc. Using two storyboards removes the necessity for AutoLayout; enabling AutoLayout, it is good to note, also removes iOS 5 compatibility. Use the code in this answer to get started.
Depending on how your app views are laid out, you may not need to make too many changes. If you have views that resize and are anchored correctly, such as scroll views or table views, they will expand to fill the additional space on the iPhone 5 screen. You need to add an additional launch image for the new screen size too.
the iphone 5's screen is taller so you'd need to have images with a resolution of 1136x640 also included in your images folder. (add -568h#2x at the end of image's filenames)
also, everytime you will adjust your sprites and everything else that goes on the screen, you will need to account for the iphone 5 separately, just like you account for the ipad and the iphone (non retina and retina).

Handling the larger device size of iPhone 5 [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to deal with iPhone 5 screen size?
Watched the iPhone 5 keynote and yes the device height and a resolution of 640 X 1136. So I saw they showed how existing apps which work on that. But I believe if we use native components like tab bar, navigation bar etc. will work fine. But how about custom tab bars, navigation bars and controls which resides relative to the device orientation. So these are my questions.
1) How to handle custom layouts which has custom tab bars, navigation bars, relative contents etc.
2) Welcome screen. We will need 2 sizes right now. So in iPhone 5 do we need another 2 more for normal and retina?
3) If you carefully watched the keynote seems iPhone 5 will cut some portion of view from left and right so there is no any additional change in the app development. Has anybody noticed that?
1) This depends on how you laid them out, you might need to adjust how you set the frame, change autoresizing masks etc, or if iOS 6 only is an option you could move to auto layout. Without knowing your code I cant give much more detail
2) There is no non-retina iPhone 5 so you only need 1 more Default.png size, named Default-568h#2x.png (btw adding this new sized default image is the trigger for iOS to show your app without letterboxing, so for some apps this is the only change which will need to be made)
3) This is the letterboxing I mentioned, it is what all current apps will do on the iPhone 5 until they are updated with a new default.png
My understanding is that all existing apps will work on iPhone 5 and you will just have the black borders. However you will now have the capability to tailor apps to the bigger screen size. I imagine that there will now be a new sized .xib or storyboard that will match the size of the iPhone 5. You will be able to put an if statement in the app delegate to choose which .xib/storyboard to load based on the screen size. unfortunately now I think we will have to create multiple .xib/storyboard files, similar to how universal apps are made at the moment. The file loaded is selected based on the device.
Hope this helps

Determine the model of iPhone device [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to deal with iPhone 5 screen size?
So with the release of iPhone 5 today and a larger screen height, how do we accommodate for different screen sizes across the different iPhone variants in our apps. I understand that apps which are not updated for iPhone 5 will be "letter boxed", but what about backwards compatibility?
Is there a way to check whether the app is running on an iPhone 3, 4 or 5?
You normally don't need that, because checking the hardware is not the right approach.
If you need to base decisions in your app on the screen size, like accomodate to the screen size for your UI, you should… test the screen size, not make some conditions on the hardware. Always test what is really necessary.
Use [UIScreen mainScreen].bounds for that (as you should always have done). Note that even before iPhone 5, one could plug its iPhone on a videoprojector or external screen and display its app on a screen with different resolution than the iPhone. That's why I hope that you never use magic numbers in your code (And if you did, you know why it's bad now ;)) and was already using constants or asking at runtime for the size of your screen.
Anyway, to accomodate for different screen sizes, if you configured your autoresizing mask correctly in your views, your applications will resize automagically. You just need to provide a Default-h568#2x.png launch image and your app will take the full size of the 4" screen.
Moreover, starting iOS6, you will be able to use AutoLayout to do finer constrainted layout of your views. See the WWDC'12 videos sessions that explains it in detail.
Checkout the UIDevice-Hardware extension, it was even recently updated to add support for the iPhone 5.

How to play the flash file on ios5? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Can we play .swf files in iphone using Objective C
I want to implement the splash screen on my app. I have an "SWF" file. How to implement the splash screen using this file? Please tell me. Any 3rd party sdk or any framework or library for the same? please give me any idea for this functionality.
Swf is not supported by iOS. You can take the image sequence and use it in place of a swf file.
You won't be able to do that because:
iPhone does not support SWF. This was one of the biggest fight in the mobile industry between Adobe and Apple
the splash screen is shown by the OS while your application is starting and not by user code
any additional animation after splash screen is against Apple's guidelines and will be rejected. See also Adding animation between splashScreen And home screen