ChrisP
ChrisP

Reputation: 10116

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

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 height value?

Upvotes: 24

Views: 24864

Answers (1)

AbeEstrada
AbeEstrada

Reputation: 1090

Not sure if this is what you need.

self.navigationController.navigationBar.frame.size.height

Upvotes: 48

Related Questions