can anyone help me how to design landscape UI design in iphone and ipad for xcode 13. previously xcode versions we have an option like Vary for Traits directly. in current version no option for vary for traits.
You can add constraints variations here:
Related
I developing an iPad application to support landscape only. I have chosen the size classes with Regular Width and Regular Height size. Whenever placing UIView or UI elements and run in the device, It works fine in the IOS 8 but it wont display in the IOS 7. seems looks like size class compatabile issue. Can anyone share your thoughts about how to resolve these UIview to display even in the IOS 7.
Thanks In Advance!!
iOS 7 Does not support size classes. I had this issue and I resolved it by forcing iOS 8 compatibility.
Unfortunately I think your best bet (which is kind of terrible) would be to branch your code and make two separate storyboards one for iOS7 and one for iOS8. That being said, given you are only supporting iPad min and iPad normal, you could do two separate storyboards depending on which device it is.
I know neither of these 3 options is ideal but thus is the cost of backwards compatibility.
Summary:
punt on iOS7
develop an iOS7 specific version and an iOS8 version
develop a separate storyboard for iPad mini and iPad Normal
I'm building an iPad application on landscape orientation on xcode 6.
I used size class
(hRegular wRegular)
.. And it looks good on iPad with iOS8 ..But when i ran it on iPad with iOS 7.1 .. The views is just not appearing.
I tried to target even
(hRegual wAny)
but it's the same..
The funny thing that the only size class accepted by iPad on iOS7 is (hAny wAny)
Hope that anyone can help me in this.
============================
Update
here is an example project for what I mean
iPad Project
When deploying an Application With Size Classes on earlier iOS versions; most size classes are backward compatible.
Following are the key points when using Size classes:
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
The value of the height component is not compact
For more information on this subject, Check out this Answer.
I'm starting on adding iPhone 6 support for my app.
I don't want to use Size Classes since the app runs on iOS7 as well.
I'm planning on using auto-layout for views positioning but I'm not sure how to handle font sizes.
I want to make some of the fonts bigger on iPhone 6 plus.
How can I do that using Auto-Layout without Size Classes?
You can use size classes and support iOS7, it's an Xcode related feature to help you design the behaviour of your app.
Get the latest version of Xcode, set the deployment target to iOS7 and start designing your ViewController's using size class.
I am using Xcode 6.1 with OS X Yosemite, I am facing a problem related to Storyboard. The storyboard is behave like iPhone on iPad mini but work as expected with iPad2, this problem is only with Storyboard with systemVersion 3.0 but not on it's lower version like version 2.0.
Below is my iPad mini screenshot (I don't want storyboard to behave like this)
and here is my iPad2 9.7 inch (I want this behaviour for iPad mini too)
I want to make this app only for iPad so my project configuration is like this
but when I change it's configuration Device iPad to Universal it works as expected in both iPad mini and iPad2. But I don't want to deploy on iPhone.
Here is my Storyboard systemVersion 3.0 as viewed source code
and when I make change in storyboard's XML systemVersion to 2.0 and targetRuntime to iOS.CocoaTouch.iPad it's again work as expected in both iPad mini and iPad2, but there is again a problem when ever I make some little changes in storyboard like move one pixel a label or button or any object Xcode will update it's systemVersion back to 3.0 and targetRuntime to iOS.CocoaTouch which will cause storyboard work again as iPhone on iPad mini.
I don't found any solution over interNet and my self too.
You can use Size Classes with iOS versions earlier than iOS 8. The Apple documentation states:
Deploying an App With Size Classes on Earlier iOS Versions
For apps supporting versions of iOS earlier than iOS 8, most size
classes are backward compatible.
Size classes are backward compatible when:
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
The value of the height component is not compact
Storyboard XML content shouldn't be edited directly. That isn't going to solve any of your problems in a reliable fashion, particularly not if you start altering version numbering so that the actual generated storyboard content is a different version to what it appears to be from the header.
It sounds like what you've encountered may be a bug in the way size classes are converted to be backwards compatible, though what is missing from your question to give more information is how you've actually configured your size classes.
You cann't use size class with iOS7, as concept of size class was introduced in iOS 8. So Removing this size class from the storyboard will work for you.
Currently, I'm working on universal app (iPhone / iPad) supported on iOS 7 & iOS 8.
Here is my problem regarding size classes :
My navigation bar is defined into a XiB file (NavBarView.xib)
Inside this file, I have a UIButton that I want to display only on iPhone mode, and a UISearchBar only for iPad mode.
To handle that whitout any line code, I used the new feature "Use size classes" available for views since iOS 8. I defined "size classes" for these two elements inside my XiB file.
UISearch for Ipad : Installed for all layouts except Compact Width / Any Height (wC hAny)
UIButton fo Iphone : Not installed for all layouts but with Compact Width / Any Height (wC hAny)
This mechanism works pretty fine on iOS 8 for iphone and ipad, but not on iOS 7. However, if I apply these size classes direclty into views contained into the storyboard, it works for iOS 7.
Could anyone explain me why my size classes are not working when they are defined into XiB files on iOS 7 ?
Best Regards and many thanks,
Lorenzo.
Barely anything to do with size classes is supported under iOS 7. Some good answers here: How can Xcode 6 adaptive UIs be backwards-compatible with iOS 7 and iOS 6?
Adding as an answer since saadnib's comment on the original question helped me a lot.
Size classes on XIB files not being backwards compatible is a bug that has been fixed on xCode 6.1.1. Strangely it's not on the patch notes but I can confirm I'm using a single xib to provide 2 different layouts for a cell on iPad and iPhone. This only started working once I updated from 6.0.1 to 6.1.1.
Limitations on backwards compatibility for classes on storyboards still apply, but they can be worked around.
Figured another option. Size classes will not work, if you add xibs view as subview to UIApplication.shared.keyWindow.
View must be in UIViewController view hierarchy to support size classes.
Thanks to #IvanKvyatkovskiy