ipad iphone 重新定位导航栏,将其向下移动以显示徽标
有谁知道uinavigationcontroller的uinvagitionbar是否可以向下移动?我想将其向下移动 200 像素左右,以便在顶部显示徽标。根据我的研究,我了解到导航栏不应该被子类化,并且只有两个属性应该更改,即颜色和可见性。那么这是不可能的吗?
我尝试移动它的框架,但没有成功。
我见过其他应用程序这样做,但我想它可能是一个工具栏?工具栏可以重新定位吗?
谢谢
Does anyone know if the uinvagitionbar of a uinavigationcontroller can be moved down? I'd like to move it around 200 pixels down to have a logo on top. From my research, I understand that the navigationbar should not be subclassed and there are only two properties that should be changed, it's color and it's visibility. So is this impossible?
I tried moving it's frame, but to no avail.
I've seen other apps do it, but I'm thinking it might be a toolbar? Can the toolbar be repositioned?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
只需更改导航控制器视图框架的大小即可。
然后,您可以将任何您想要的视图添加到包含 navigationController 视图的视图或窗口中。
然而,如果您打算通过提供模态视图控制器来做到这一点,则需要考虑一些棘手的事情。
Just change the size of the frame of the navigations controller's view.
You can then add whatever view you'd like to the view or window that contains the navigationController's view.
There a few tricky things to consider if you plan on doing this by presenting a modal view controller, however.
您可以隐藏 self.navigationController 并在代码中放置另一个导航栏,该导航栏将根据您的框架集移动。
是的,工具栏可以重新定位。只需在代码中进行控制并根据您的要求设置其框架即可。
快乐编码...
You can hide the self.navigationController and put another navigation bar in the code which will move according to your frame set.
Yes the tool bar can be repositioned. Just take a control in your code and set its frame as per your requirement.
Happy Coding...