I’m creating a library which will add a view at the bottom of the application (when my library is integrated in application).
I’m using view controller’s view’s frame parameter to get the size of the view and calculation my library’s view frame according and showing it.
The problem is that when navigation bar is there, my view is going still below the actual view visible. So, i want to know whether current view controller is based on navigation controller or not and whether navigation bar is visible in that view or not. how can I find that?
I’m creating a library which will add a view at the bottom of the
Share
UINavigationBarinherits from and has all the fine properties and behaviors ofUIViewand one of these properties ishidden.So for your view, if you can get a handle to your navigation bar, all you need to do is check to see if
hiddenisYESorNO.one way to do this would be to have a UINavigationController property or accessor (setter & getter) for your library so whoever makes use of the library can set the navigation controller and/or bar on your library’s behalf.