Search code examples
ipadios8storyboardpopoversize-classes

iOS8 Size-Classes and Popover Views


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??


Solution

  • After some time the penny dropped to check the Any/Any Size class constraints.... These were matching the erronous constraints that I was spitting out in the logs. So I designed the Popover view in the A/A size class and it worked fine!

    This might seem obvious to some but I thought that because my App was R/R that my Popover constraints should be in R/R. However it looks like that if you are using a VC as a Popover that the constraints need to be made in the A/A Size Class.