开发者

How do I obtain the height of UINavigationBar.navigationItem programmatically?

开发者 https://www.devze.com 2023-02-28 09:34 出处:网络
I am creating a custom UIToolbar to use as a UIView in the UINavigationBar.navigationitem.titleView property. I would like to size the toolbar height to that of the .navigationitem by obtaining the cu

I am creating a custom UIToolbar to use as a UIView in the UINavigationBar.navigationitem.titleView property. I would like to size the toolbar height to that of the .navigationitem by obtaining the current height of the .navigationitem rather than hard code it. Is there a way to obtain the 开发者_如何学Cheight value?


Not sure if this is what you need.

self.navigationController.navigationBar.frame.size.height

0

精彩评论

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