Fixed bottom margin#456
Conversation
There were a couple of situations where the bottom text bar could be behind the tab bar related to the view being loaded and laid out before it was in a tab bar controller. This forces constraints to be updated after any parent view controllers change.
|
Could you please explain how to reproduce this bug? |
|
When pushing over a UINavigationController stack, I'm seeing a 2-3 pts movement on the layout because of the changes in |
|
I will create an example app that reproduces this and maybe refine the solution to fix the movement you're seeing (good catch). It happens if for some reason the view gets loaded before being added to the parent. |
Now instead of updating our bottom margin when we finish moving to a new view controller (which is called often at the end of an animation) we update it in viewWillAppear, which is called late enough that we should have a valid tabBarController but soon enough that the view controller won't be on screen yet.
|
I finally got around to reproducing this cleanly.
I was able to reproduce this by forcing the view to be loaded immediately but waiting a second to actually display it. There are more subtle ways that this can be triggered, for instance during state restoration, but this is the easiest way to reproduce it with the least amount of code. I was not able to reproduce the pixel movement you mentioned, but I changed to updating the margin in |
|
I have issues with extra space between the tableview, top of viewcontroller and the textview, resolves when tapping the textfield and close again (layout subviews). Also the mentioned fix resolves the issue. |
|
Ah nvm, can be solved the same way as mentioned in David's comment 🎉 |
There were a couple of situations where the bottom text bar could be behind the tab bar related to the view being loaded and laid out before it was in a tab bar controller.
This forces constraints to be updated after any parent view controllers change.