简体   繁体   English

如何在标签栏上方和导航栏下方添加子视图?

[英]How to add subview above tabbar and below navigationbar?

My app has a right bar button item, when user taps it, an mask with opacity is added to view then slides down a droplist menu. 我的应用程序有一个右栏按钮项,当用户点击它时,会添加一个不透明的蒙版以供查看,然后在下拉列表菜单中滑动。 I try to add these two views(maskview and droplist view) to self.view , but the tabbar appears on the top of the window. 我尝试将这两个视图(maskview和droplist视图)添加到self.view ,但是选项卡显示在窗口顶部。

An I try to add views to self.view.window , but navigation bar is masked during "droplist slide down" progress. 我尝试将视图添加到self.view.window ,但是在“下拉列表下拉”过程中导航栏被遮盖。

Any ideas? 有任何想法吗?

Update : I wanna the following animations but with mask tabbar. 更新 :我想要以下动画,但带有遮罩标签栏。

在此处输入图片说明

Try to add your view in window, 尝试在窗口中添加视图,

AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
[appDelegate.window addSubview:yourView];

but make sure that view added after navigation bar frame. 但请确保在导航栏框架之后添加该视图。 (For ex. your view's y origin = 64) (例如,您的视图的y原点= 64)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM