开发者

UIToolbar doesn't rotate correctly when at the top of the screen

开发者 https://www.devze.com 2023-03-31 09:12 出处:网络
My UIToolbar doesn\'t rotate correctly when it\'s placed at the top of the s开发者_C百科creen. When rotated, it rotates out of the screen. However, when I place it at the bottom of the screen, it work

My UIToolbar doesn't rotate correctly when it's placed at the top of the s开发者_C百科creen. When rotated, it rotates out of the screen. However, when I place it at the bottom of the screen, it works fine. Does anyone else have a solution to this problem? The only reason I'm bothering with this is because I'm making a web browser and usually the address bar is at the top of the screen, but you're limited to only two objects in a UINavigationBar (back button, text field, forward, refresh, etc). Any ideas? Thanks for your help!


Who says you are limited to only two objects in the UINavigationBar? You can set the leftBarButtonItem & rightBarButtonItem properties to any custom view. If you need more buttons, you can create a UIBarButtonItem with a UIToolbar as a custom view, and add as many buttons to the UIToolbar as you want.

0

精彩评论

暂无评论...
验证码 换一张
取 消