开发者

iPad Toolbar UI Question

开发者 https://www.devze.com 2023-03-03 04:52 出处:网络
I need to have an iPad app that has a consistent toolbar at the top of the screen.I need it to adjust when switch from landscape to portrait.Essentially what I need is something that acts like a UINav

I need to have an iPad app that has a consistent toolbar at the top of the screen. I need it to adjust when switch from landscape to portrait. Essentially what I need is something that acts like a UINavigationController, but allows me to have an arbitrary number of buttons like a UIToolbar. I've seen this done, but I can't figure out how to do开发者_开发知识库 it.

Thanks


There is no reason you can't just use a standard UIToolbar at the top of the screen, rather than the bottom. This allows you to add as many buttons as you can squeeze on, and customise their appearance.

In order that it should adjust its size when switching interface orientation, you simply need to adjust its autoresizingMask property. This is easy in Interface Builder - just turn on the horizontal arrow in the middle of the autoresizing box (this makes the width flexible), and maybe make sure that the left, right and top struts are enabled to so as to hold it in the correct position.

0

精彩评论

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

关注公众号