Issues with safe area and page view, i wasn't able to post the question because stackoverflow was giving me an error about "code" but i include no code so i instead posted images, please refer to the below images thanks.
Asked
Active
Viewed 516 times
1
-
Not sure I 100% understand your question, but try checking “Use Safe Area Layout Guides” in addition to “Use Auto Layout" and “Use Trait Variations." – Lyndsey Scott Jun 13 '18 at 01:00
2 Answers
0
Auto layout behaves strangely sometimes. When It isn't working for me, there is a few things I do to try and resolve it which may or may not be useful to you: I
- duplicate the view controller so anything I do is isolated to that instance only.
- Set the new (duplicated) view controller to be initial one.
- Remove all constraints
- Run the app and view on your phone to check the result.
- Possibly shift + command + K to clean the app cache, as sometimes little glitches occur when a lot of minor auto layout changes have been made.
- Run the app again and see if there was any changes.
- Introduce any auto layout features one at a time and run the app between to see it's heading in the right direction.
I have found that doing it on another view controller and following at least a variation on the above procedure usually resolves most of the auto layout issues as you are describing. Best of luck and I hope it helps!

michael
- 1
- 1
0
So i don't understand why but the fix for this was to add a pageViewHolder view on the uiviewcontroller that is presenting the viewcontroller, and than setup the constraints with a constant of 1 for the bottom like so
self.pageViewHolder.addConstraint(NSLayoutConstraint(item: (self.pageController?.view)!, attribute: .bottom, relatedBy: .equal, toItem: self.pageViewHolder, attribute: .bottom, multiplier: 1.0, constant: 1.0));
Also NOTE that the pageViewHolder is constrained to the superviews bottom not safelayout.

Travis Delly
- 1,194
- 2
- 11
- 20