在 UINavigationBar 和 UIViewController 上覆盖 UIView
本质上,我想在 UINavigationController 下方显示一个通知,覆盖最顶部 UIViewController 视图所占据的区域。但是我希望背景图像向上延伸并部分覆盖 UINavigationBar
成品应该如下所示
诀窍在于我只希望它适用于具有视图层次结构的某些视图,因此通过以下方式解决问题使用 [UIApplication keyWindow]
可能不是最好的主意。另外,我假设通过使用私有 UINavigationTransitionView
之外的视图不会成为视图转换动画的一部分,当弹出该视图时,我的视图将保留在控制器的顶部。
最顶层视图控制器的视图也没有帮助,因为它的框架终止于 UINavigationBar 的底部,这意味着箭头不会与 UINavigationBar 重叠
。
谢谢
Essentially i want to display a notification just beneath the UINavigationController, covering the area that would be occupied by the top most UIViewController's view. However i want the background image to extend upwards and partly cover the UINavigationBar
The finished product should hopefully look like the below
The trick comes in that i only want this to apply to certain views with the view Hierarchy, so attacking the problem by using [UIApplication keyWindow]
might not be the best idea. Also i assume that by using views outside of the private UINavigationTransitionView
won't be part of the view transition animation, leaving my view on top of the controller beneath when this one is popped.
The view of the topmost view controller doesn't help either, as it's frame is terminates at the base of UINavigationBar
, meaning arrow won't overlap the UINavigationBar
Suggestions?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因为您似乎面临
Navigation Bar
的问题,因为它不允许重叠视图。这是棘手的部分......
只需使用自定义后退按钮将图像设置在导航栏按钮左侧的上方
这肯定会对您有所帮助&解决您所有的相同查询....
Since it seems that you are facing the problem with
Navigation Bar
only as that will not allow to overlap the View.This is tricky part....
Just use the Custom back button set the image over it in left of the Navigation bar Button
This is surely going to help you & solve all your Queries for the same ....