问题
I'm testing the new universal storyboard in XCode 6. I basically created a view with a toolbar positioned at the bottom. When I run that basic example in the iPad the toolbar is not at the bottom
And here is in the storyboard
How can I place the UIToolbar at the bottom and using all the available width for all different screens?
回答1:
Use Autolayout. Set the left margin, right margin and bottom space constraints on the toolbar to make it dock at the bottom. Optionally, add a height constraint if you want the toolbar height to be something other than the standard 44.
Your constraints on your toolbar in the storyboard should look like this:
1:
来源:https://stackoverflow.com/questions/31987104/uitoolbar-not-positioned-at-the-bottom-on-device-but-appears-ok-in-storyboard