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




回答2:


For me, setting size to Any-Any then re-setting to Regular-Regualr fixed it.



来源:https://stackoverflow.com/questions/28559327/ios8-size-classes-and-popover-views

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!