- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试在我的第二个 TabBarController 上创建一个显示“正在加载数据..”的 UIView 覆盖层,它没有覆盖我的导航栏和 TabBar。
我目前有这个作为我的代码
UIView *overlayView = [[UIView alloc] initWithFrame:self.navigationController.view.frame];
overlayView.backgroundColor = [UIColor blackColor];
overlayView.alpha = 0.4;
overlayView.tag = 88;
UILabel *message = [[UILabel alloc] initWithFrame:self.navigationController.view.frame];
[message setFont:[UIFont fontWithName:@"HelveticaNeue-Light" size:20.0f]];
message.text = @"Loading data...";
message.textColor = [UIColor whiteColor];
message.textAlignment = NSTextAlignmentCenter;
message.tag = 99;
[self.navigationController.view addSubview:overlayView];
[self.navigationController.view addSubview:message];
目前消息运行良好,但 UIView 覆盖层覆盖了我的 TabBar?你能帮我解决这个问题吗?
清除它:我想以编程方式显示一个 UIView 覆盖层,它不会覆盖 navBar 和 tabBar。
谢谢,干杯!
最佳答案
您需要在 ViewController
上添加您的 View ,这样它就不会覆盖 NavigationBar
和 TabBar
。
[self.view addSubview:overlayView];
[self.view addSubview:message];
根据您当前的 View 设置框架。
希望这有助于覆盖全屏。
关于ios - UIView 覆盖在带有 NavBar 和 TabBar 的 collectionViewController 上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43062479/
我有一个从网络中提取数据的 collectionView,然后用户删除了一个对象,我想显示剩余的对象。由于过去在索引处删除对象并处理与网络版本同步的本地数据的噩梦,我可以接受新的调用以获取新的网络数据
我正在制作一个显示口袋妖怪及其类型的应用程序。该应用程序的一部分也会显示他们的弱点。 我有一个列出所有口袋妖怪的全局变量,如下所示: var objects = [ { "id": "001", "t
我创建了一个 CollectionView控制并用图像填充它。现在我想在开始时滚动到特定索引处的项目。我试过scrollToItemAtIndexPath如下: [self.myFullScreenC
我目前正在开发一个元素周期表,并使用 Collection View 来显示该表。元素周期表有 118 个元素,我试图在同一页面中显示它们,但当我在模拟器上运行该应用程序时,只显示 77 个单元格。
我正在使用 Firebase 制作一个 iPhone 应用程序,但我在使用以下代码时遇到了一个小问题。 import UIKit import Firebase class ChatControlle
我只是想通过只创建一个 UICollectionViewController 而不是两个来减少代码重复,因为它们几乎是一样的。我只需要给用户一个事务的感知,比如添加 BackButton 和执行事务效
我有一个包含 Collection View 的标准 View Controller 。 我正在使用从 UICollectionViewCell 的自定义子类创建的自定义单元格填充 Collectio
当我在 CollectionCiewController 上调用函数时带按钮 CollectionViewHeader , 它使 c.view 上的所有变量为零.我找不到问题出在哪里。 @IBAct
我一整天都在尝试使用 CollectionViewController 而不是 ViewController。在我的 Storyboard中,我有一个 CollectionViewController
当我使用 CollectionView 实现 viewController 时, 是否应该拖拽CollectionViewController从storyBoard然后创建一个MyCollection
我不知道为什么我的收藏没有显示任何单元格。我将编写使用 UICollectionViewController 创建最简单的 Collection View 的步骤。 我删除了 Storyboard 中
我有一个 collectionviewcontroller 并在代码中添加了一个标题 View 。标题从状态栏下方开始,所以看起来很奇怪,因为我的标题是彩色的,而我的 Collection View
我正在尝试创建一个 View ,其中包含三个具有不同 View Controller 的 subview (UICollectionViewController、pageviewcontroller
我能够在数组中找到响应数据,但无法在 Collection View 中下载和填充。我尝试从应用程序的图像容器上传图像,但无法通过 API 下载和上传 代码 func get_data_fro
我正在尝试在我的第二个 TabBarController 上创建一个显示“正在加载数据..”的 UIView 覆盖层,它没有覆盖我的导航栏和 TabBar。 我目前有这个作为我的代码 UIView *
我想从自定义 tableViewCell(符合 UICollectionViewDelegate, UICollectionDatasource)类实例化一个 ViewController有一个自定义
我是一名优秀的程序员,十分优秀!