ios - iPhone 6 Plus Autorotation Issue -


i'm running strange autorotation issue on iphone 6 plus (simulator , actual device).

i have created fresh xcode project single view. , has ui elements in initial view controller (with proper constraints). here's looks on initial launch:

enter image description here

but once, change device orientation, ui elements disappear?!?!

enter image description here

this not happen on other devices.

what missing here? appreciate help.

regarding original question: size class of auto layout constraints seems wrong. cause view rendered in 1 width/height combination fine , fail in another. designing in size class other any/any result in blue size class bar @ bottom of xcode indicating / warning that.

in general should specify constraints every supported size classes. easiest way design view in any/any class. way layout same on configurations. can alter specified constraints 1 size class selecting size class , inspecting view´s constraints, enable/disable them or add new ones. set in specific size class. view constraint can either select in storyboard or double click on in size inspector of view belongs to. last section in size inspector of constraint tells in size classes exists.

example size class setting of constraint

to migrate view 1 size class just mean change size class on every view , constraint...

manual way
need add size class want migrate pressing + next installed checkbox , click on little x on left of size class want migrate from. if want migrate any/any, don't click on +, tick checkbox next installed. , not forget change size class on view object well. if not view not present in desired size class.

automatic way
possible changed viewing source code of storyboard file well. constraint setup might this

<variation key="default">     <mask key="subviews">         <exclude reference="ftd-hz-zt3"/>     </mask>     <mask key="constraints">         <exclude reference="eyr-ok-lvv"/>     </mask> </variation> <variation key="heightclass=compact-widthclass=regular">     <mask key="subviews">         <include reference="ftd-hz-zt3"/>     </mask>     <mask key="constraints">         <include reference="eyr-ok-lvv"/>     </mask> </variation> 

the key attribute in variation item apparently specifies size class. default meaning any/any. lot easier search , replace occurrences of size class want migrate size class want migrate to. if migrating or default class little bit trickier since have change exclude include , vice versa. have add / remove complete size class section migrating to/from. little bit more work, still lot easier doing hand.
should careful if view contains size class specifications multiple size classes change correct ones.


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -