开发者

Thinner UIToolBar

开发者 https://www.devze.com 2023-01-23 11:33 出处:网络
How can I create a thinner UIToolBar in my iOS-app? The standard size is 44px, and I 开发者_运维知识库would like to have it in 30 or 35px.

How can I create a thinner UIToolBar in my iOS-app? The standard size is 44px, and I 开发者_运维知识库would like to have it in 30 or 35px.

Is it possible?


You could try changing its frame, but I suspect the best way is to subclass it and override its drawRect method. Other than that you could invent your own UIView subclass for a thin toolbar.


Sounds like a custom UIView that you'll need to create.

See This Link


Not possible to change the height of UIToolbar. You could create your own custom toolbar or if you're feeling lazy use an image that looks like one.

In landscape mode, I believe the toolbar height gets smaller automatically, but this is a fixed size.

0

精彩评论

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