Domanda

I have a tab bar controller, on the second tab one of the objects I put in my view was a page control. I set a constraint so that it would appear right above the tab bar. When I look at it in the storyboard it looks exactly the way I want it to. When I open the app in the simulator and switch to that second tab, at first the page control is completely hidden, if I rotate the screen and then rotate back it appears and looks just fine.

The constraint in question is vertical space between the bottom layout guide.top and page control.bottom equal to 0.

Constraints for paging control Detail of constraint Layout of paging control

È stato utile?

Soluzione

Try this, delete all constraints you have now. Then add the following. Height, width, TO BOTTOM OF VIEW, then center in container. It should look like this..

storyboard

Rotation should be fine now, and you will see your page control. I set it up the way you had it and was able to repeat what you saw. Setting that constraint to the bottom of view helped.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top