UIImageView resizing issue in UIPageViewController

后端 未结 3 1401
悲哀的现实
悲哀的现实 2021-02-07 10:06

I\'m building a new app and wish to have a \"Welcome walkthrough\" at the beginning wherein I have a storyboard with a series of images presented in a UIPageViewController. I ha

3条回答
  •  孤独总比滥情好
    2021-02-07 10:20

    I figured out my problem was that when the view controller began animating the Top and Bottom Layout Guides had no height. The right and left margins didn't either. When the view finished animating they all received a height or width and my view resized itself. I fixed this problem on my project by adding vertical constraints between my objects and their super view instead of to the Top/Bottom Layout Guide. I also had to change my horizontal constraints to ignore the side margins.

    The last issue I came across is that I had to account for the status bar myself. It may or may not be there or it could be a double bar, like when you are using Maps.

提交回复
热议问题