size-classes

Vary for Traits in XCode 8 orientation

南笙酒味 提交于 2021-01-28 05:21:51
问题 I am confused if 'Vary for Traits' is the right thing to define different set of layout constraints for Portrait & Landscape mode on iPhone. My objective is to have different layouts for Portrait & Landscape modes on the iPhone (doesn't matter on iPad). I tried 'Vary for Traits' and define different set of NSLayoutConstraints for Portrait & Landscape modes but it seems to be not working. Basically if I have constraints P1 & P2 active for portrait mode and C1 & C2 for landscape mode for the

Override horizontally compact environment behaviour for modalPresentationStyle of '.formSheet'

廉价感情. 提交于 2020-07-22 12:30:50
问题 When presenting a UIViewController with modalPresentationStyle = .formSheet , Horizontally compact environment behaves same as UIModalPresentationStyle.fullScreen According to Apple's Documentation UIModalPresentationStyle.formSheet. In a horizontally regular environment, the view controller is sized so that its content area is smaller than the screen size and a dimming view is placed underneath the content. If the device is in a landscape orientation and the keyboard is visible, the position

UITraitCollection Clarification

时光总嘲笑我的痴心妄想 提交于 2020-01-29 04:05:28
问题 I'm trying to figure out how to use UITraitCollection programatically, but I find it difficult to make sense of it. I'm developing for an iPad retina, in iOS 8. println(self.traitCollection) returns the following output: <UITraitCollection: 0x10df4c7f0; _UITraitNameUserInterfaceIdiom = Pad, _UITraitNameDisplayScale = 2.000000, _UITraitNameHorizontalSizeClass = Regular, _UITraitNameVerticalSizeClass = Regular, _UITraitNameTouchLevel = 0, _UITraitNameInteractionModel = 1> Which is pretty

Flexible horizontal spacing between ui labels

对着背影说爱祢 提交于 2020-01-17 04:36:12
问题 I am using auto layout in storyboard with all resolution support,but I am stuck on one thing that.I want flexible horizontal spacing between my labels using constraints.Please see screenshot for more details. This is a 4.7inch screen.This screen is correct as I designed for particularly this screen 4 inch screen 5.5 inch IPad screen Please help to manage my labels spacing equally in all supported resolutions with auto layout and constraints. Edit This is my view hierarchy and it is also a

AutoLayout with size classes: Different spacing depending on iPhone screen size

元气小坏坏 提交于 2020-01-15 18:00:52
问题 I have a UIViewController set up in an UIStoryboard in Interface Builder using size classes. This looks good on an iPhone 5 with the 4" screen, but on the 5.5" screen of the iPhone 6 Plus the elements are too cramped in the top area of the device. I want to increase the constant of the spacing constraints on iPhone 6 and 6 Plus. As far as I was able to see that's not possible with size classes, as there is only one size class for all iPhone displays (no matter if 3.5" or 5.5"). What is the

AutoLayout with size classes: Different spacing depending on iPhone screen size

允我心安 提交于 2020-01-15 17:58:31
问题 I have a UIViewController set up in an UIStoryboard in Interface Builder using size classes. This looks good on an iPhone 5 with the 4" screen, but on the 5.5" screen of the iPhone 6 Plus the elements are too cramped in the top area of the device. I want to increase the constant of the spacing constraints on iPhone 6 and 6 Plus. As far as I was able to see that's not possible with size classes, as there is only one size class for all iPhone displays (no matter if 3.5" or 5.5"). What is the

AutoLayout with size classes: Different spacing depending on iPhone screen size

烂漫一生 提交于 2020-01-15 17:58:11
问题 I have a UIViewController set up in an UIStoryboard in Interface Builder using size classes. This looks good on an iPhone 5 with the 4" screen, but on the 5.5" screen of the iPhone 6 Plus the elements are too cramped in the top area of the device. I want to increase the constant of the spacing constraints on iPhone 6 and 6 Plus. As far as I was able to see that's not possible with size classes, as there is only one size class for all iPhone displays (no matter if 3.5" or 5.5"). What is the

iOS8 Size-Classes and Popover Views

梦想的初衷 提交于 2020-01-15 07:10:29
问题 I had an issue with Popover on an iPad app I was working on recently...going to just post it here as I think it may help others. I'm using Xcode 6 and iOS 8 and Size Classes and the Popover View was built in a Storyboard. As my iPad App is in Regular/Regular Size Class all the time I built the Popover view in R/R too. No matter what I did with Constraints though, the popover just never looked right, it was a mess. So what was wrong?? 回答1: After some time the penny dropped to check the Any/Any

iOS8 Size-Classes and Popover Views

萝らか妹 提交于 2020-01-15 07:05:29
问题 I had an issue with Popover on an iPad app I was working on recently...going to just post it here as I think it may help others. I'm using Xcode 6 and iOS 8 and Size Classes and the Popover View was built in a Storyboard. As my iPad App is in Regular/Regular Size Class all the time I built the Popover view in R/R too. No matter what I did with Constraints though, the popover just never looked right, it was a mess. So what was wrong?? 回答1: After some time the penny dropped to check the Any/Any

iOS8 Size-Classes and Popover Views

你离开我真会死。 提交于 2020-01-15 07:04:17
问题 I had an issue with Popover on an iPad app I was working on recently...going to just post it here as I think it may help others. I'm using Xcode 6 and iOS 8 and Size Classes and the Popover View was built in a Storyboard. As my iPad App is in Regular/Regular Size Class all the time I built the Popover view in R/R too. No matter what I did with Constraints though, the popover just never looked right, it was a mess. So what was wrong?? 回答1: After some time the penny dropped to check the Any/Any