Closed happiehappie closed 6 years ago
Im guessing you don't want the black view to go off the top of the screen?
Id put another UIView inside the blue view, then add the textfield and button to this new UIView. The new UIView can be your avoiding view.
But then won't the "another UIView" overlap with the black view?
Or is this the expected behavior?
Depends what you want. I'd add a constraints between the black view and the new view so that they can't overlap (e.g. min constraint height = 8)
But depending on the size of the device you might not be able to fit everything on the screen. You might need to lower the priority of a constraint (e.g. black view top or height constraint) so that it'll move off the top or shrink if needed
Got it sorted?
I have the following screen, blue background being the container view and my avoiding view.
However, when I present my keyboard, the container view overlaps with my status bar. Was wondering if there's any way to dodge this? My self.view.clipsToBounds is already set to true if that matters