In Xcode 13, I added an iPhone 7 Plus simulator that appears to work. However, when I open one of my XIB files, the iPhone 7 size is missing from the Interface Builder list. I already restarted Xcode to no avail. How can I add the iPhone 7 Plus in this list?
You are designing an interface here. Those are merely screen sizes. The iPhone 8 screen is identical to the iPhone 7 screen, and the iPhone SE 2 is the same as both (375x667, 2x), so no point listing more than the iPhone SE 2.
Related
I have been developing an iOS App with iPhone(4-inch) Storyboard. Now I would like to use the same storyboard for iPad also. My iPhone storyboard contains 130+ scenes now.
I need to make it for iPad also.
I tried solution from link:
Converting Storyboard from iPhone to iPad
After following it my Xcode crashes, may be due to many scenes in the single storyboard.
I know about size classes in Xcode 6 and also tried it but the fonts don't update for the iPad size class(Regular Width| Regular Height) on simulator/device with iOS 7 but on iOS 8 it does. Since I have deployment target as iOS 7 I can't overlook the issue.
Can anyone help me with a solution that works on Xcode 5.1.1 of having same iPhone storyboard for iPad(Like a Universal App) as well?
Any help/clue will be appreciated.
Thanks.
Have you tried using size classes?
If that doesn't work, you could always use 2 different storyboards- 1 for the iPhone and 1 for the iPad
I created a new app in Xcode 6 using Size Classes. After testing with iOS 7, I can't figure out how to get iPhone to display a certain size class while in landscape mode.
I first developed the UI with iPhone landscape as wAny hCompact, but iOS 7 doesn't recognize that. I had iPhone portrait in wAny hAny.
I then changed it so now I'm using wCompact hRegular for iPhone portrait. I then modified wAny hAny to be the landscape layout. But it's not using that layout when the iOS 7 device is in landscape.
Is iOS 7 able to use different size classes based on the device being portrait or landscape? If so, which size class should I be using?
Reference: Really helpful information about backwards compatibility with size classes.
ps. I'm not concerned with iPad because the device does not display a different size class based on the device rotation in iOS 8.
Size classes works in iOS 7 for sure. But only if you follow several rules:
The app is built using Xcode version 6 or later
The deployment target of the app is earlier than iOS 8
Size classes are specified in a storyboard or xib file
The value of the height component is not compact (yep, this is your case, it's not possible in iOS 7, unfortunatelly)
There is a little explanation here: https://stackoverflow.com/a/24976792/2190175
No I'm afraid that Size Classes were introduced in iOS 8. You could write some conditional code to run on iOS to determine the screen/view size/orientation and change the the layout that way when iOS 8 becomes your minimum target the conditional code can be removed.
I've installed Xcode 5 alongside Xcode 4 so I can build for both iOS6 and 7 SDKs.
I have a working iPhone App that, when I load it in Xcode 4 and build it to run on the iPad simulator it shows up with the 1x/2x button in the bottom right corner of the screen indicating that this is an iPhone App installed on an iPad.
When I do the same thing in Xcode 5, however, it appears that it isn't installing it on the iOS7 iPad simulator as an iPhone app because I don't see the 1x/2x button in the corner, and things are laid out slightly differently.
Again, this is the exact same Xcode project (actually it's a workspace) opened in Xcode 4 and built for an iPad simulator and opened in Xcode 5 and build for an iPad simulator.
Does anybody have any ideas on how to get an iPhone app to run as such on an iOS7 iPad simulator? Or why this might be happening?
iOS 7 uses the iPhone's retina artwork and so always appears in x2 format.
When I am building an application for both the iPhone 3.5 inch & iPhone 4 inch, is it possible to test both form factors using the iPhone 5, instead of having to keep switching between phones?
I know that the iPhone 5 automatically puts black bars beneath and above any app that is not iPhone 5 compatible, but it would be great to be able to test apps in that way.
I doubt it's currently possible, as I haven't found any options for that in Xcode myself, but it would be awesome if Apple would add that feature. Thanks in advance for any responses.
If you remove the Default-568h#2x.png from the project (just remove it's target membership) and clean the project you app is presented in 3.5 inch mode.
There is not way the set the run parameter too force it in 3.5 inch mode. You could also just connect both iPhones to you development machine and when you want to debug the app select the device you want to test on.
I think it should be enough to not supply a Default-586h#2x.png launch image. Just have Default.png and Default#2x.png, then the app should be letterboxed on the 4" simulator.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
What are the steps required to migrate existing apps to the iPhone 5 widescreen display?
How to deal with iPhone 5 screen size?
I have universal app for iPhone/iPad, but as you know, 12th of September Apple presented us new iPhone 5 with new 4 inch display. How to name and make .xib files for iPhone 5? Now there are black lines instead
I upgraded an universal app by taking the following steps:
Autorotation is changing in iOS 6. In iOS 6, the shouldAutorotateToInterfaceOrientation: method of UIViewController is deprecated. In its place, you should use the supportedInterfaceOrientationsForWindow: and shouldAutorotate methods. Thus, I added these new methods (and kept the old for iOS 5 compatibility):
-(BOOL)shouldAutorotate {
return YES;
}
-(NSUInteger)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskAllButUpsideDown;
}
Then I fixed the autolayout for views that needed it. Remember to test the autorotation in iOS 5 and iOS 6 because of the changes in rotation.
Copied images from the simulator for startup view and views for the iTunes store into PhotoShop and exported them as png files. The name of the default image is: Default-568h#2x.png the size is 640 x 1136 and the screen size 320 x 568.
I have dropped backward compatibility for iOS 4. The reason is that this new Xcode does not support armv6 code any more. Thus, all devices that I am able to support now (running armv7) can be upgraded to iOS 5.