It will be better to add to properties "Toolbar" and "Navbar". By this way, it will be possible to access some property as hanspi wants, but also to change some stuff (for exemple, add a button in a toolbar, etc etc...
In your code, this is juste 2 lines to add. But if we added this line in our source code, it will be overried when you release a next version. So, it will be great if you change some Fstuff variable from "private" to "protected" in all of your classe. So, we can create our own component herited from yours without asking you to add a lot of new featurs :)
Anyway, thank you Babak. The more I use the components, the more I love it !
To hanspi :
open the file DPF.iOS.UINavigationController.pas, and add this to lines after public :
property NavBar:TDPFNavigationNavBar read FNavBar;
property ToolBar:TDPFNavigationToolBar read FToolBar;
Recompile the package, and now, you can acces what you want :
=> PageController.navbar.Height
=> PageController.ToolBar.Height
Last edit: Pierre Moati 2013-10-20
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank's for your answer. Your code run's on designtime, but not on Simulator/Device. The "ToolBar.Height" goes back to orign value (44), also if I set the new value in the OnShow event of the MainForm.
Regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When used in conjunction with a navigation controller, there are only a handful of direct customizations you can make to the navigation bar. Specifically, it is alright to modify the barStyle, tintColor, and translucent properties of this class, but you must never directly change UIView-level properties such as the frame, bounds, alpha, or hidden properties directly.
If you want to attempt to change height maybe you app rejected from App Store.
Regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Babak
Is it possible for you, to add the property's ToolBarHeight and NavBarHeight on TDPFNavigationController?
Thank you.
Regards
It will be better to add to properties "Toolbar" and "Navbar". By this way, it will be possible to access some property as hanspi wants, but also to change some stuff (for exemple, add a button in a toolbar, etc etc...
In your code, this is juste 2 lines to add. But if we added this line in our source code, it will be overried when you release a next version. So, it will be great if you change some Fstuff variable from "private" to "protected" in all of your classe. So, we can create our own component herited from yours without asking you to add a lot of new featurs :)
Anyway, thank you Babak. The more I use the components, the more I love it !
To hanspi :
open the file DPF.iOS.UINavigationController.pas, and add this to lines after public :
property NavBar:TDPFNavigationNavBar read FNavBar;
property ToolBar:TDPFNavigationToolBar read FToolBar;
Recompile the package, and now, you can acces what you want :
=> PageController.navbar.Height
=> PageController.ToolBar.Height
Last edit: Pierre Moati 2013-10-20
Hi Pierre
Thank's for your answer. Your code run's on designtime, but not on Simulator/Device. The "ToolBar.Height" goes back to orign value (44), also if I set the new value in the OnShow event of the MainForm.
Regards
Dear Babak
It would be very nice if you add the both property (ToolBarHeight,NavBarHeight) or any other solution to modifying the bar height.
Thank you.
Regards
Hi hanspi
The default height of the navigation bar is 44px.
The documentation certainly discourages it:
If you want to attempt to change height maybe you app rejected from App Store.
Regards
Hi Babak
Ok, I see. That is really too bad.
Thank you for the info and your great job in this components.
Regards
Dear Babak,
if navbar height should be 44px why it is commented here and 74px is assigned?
line #503: FNavBar.Height := 74; // 44;
and in Line #809: FNavBar.Height := 44 + 30;
i hope you can check it as i get a non-standard navbar height in my app.
Note: I tried to change it and the navbar is changed but still the frame height is not
thanks
Last edit: NetGuy 2015-10-31