开发者

how to align customViews on a NavigationBar?

开发者 https://www.devze.com 2023-03-22 00:03 出处:网络
I am having problems trying to align 2 customViews on the NavigationItem.titleView. I have read the documentations and found out that the titleView is aligned in the center. Is there any way to align

I am having problems trying to align 2 customViews on the NavigationItem.titleView. I have read the documentations and found out that the titleView is aligned in the center. Is there any way to align my view on the left or right of the NavigationController? Below shows you 2 images:

how to align customViews on a NavigationBar?

search bar is covering a text field

how to align customViews on a NavigationBar?

ideal output

EDIT: I have attempted another to de开发者_StackOverflow中文版al with this, use a ToolBar instead of a NavigationController. ToolBar idea works, but how do I set a title like the NavigationBar which have a .prompt property? Adding a label will have very little space left for me to do anything. Please advice, I have been working on this for the whole day and I cannot solve this minor problem :(

how to align customViews on a NavigationBar?

failed toolbar


use a tool bar instead. if its a navigation controller, hide the navigation bar and add the tool bar... i think thats the easiest way...

0

精彩评论

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