- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我的模态视图 Controller 显示在 UIActionSheet 后面,并且我的 UIActionSheet 没有被忽略。我正在使用:
[self presentModalViewController:composeTweetView animated:YES];
展示我的模态视图 Controller 。
我的操作表正在从 tabBar 显示:
[actionSheet showFromTabBar:self.parentViewController.tabBarController.tabBar];
此代码适用于 iOS 4.0。
if (buttonIndex == 0) {
if (self.isLoggedIn) {
[FlurryAPI logEvent:@"ST_REPLY_CLICKED"];
composeTweetView.isDirectMessage = FALSE;
[self presentModalViewController:composeTweetView animated:YES];
[composeTweetView release];
}
else {
LoginViewController* loginView = [[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil];
loginView.delegate = self;
loginView.isPostingComment = TRUE;
self.isReply = TRUE;
[self presentModalViewController:loginView animated:YES];
[loginView release];
[composeTweetView release];
}
}
摘要:
我有一个包含 UITabBar 的 UIViewController。我正在展示一个 UIActionSheet,其中有一些呈现模态视图 Controller 的按钮。当模态视图 Controller 出现时,UIActionSheet 应该自行消失,并且模态视图应该位于堆栈的顶部。问题是,UIActionSheet 不会关闭,模态视图会在其后面加载。这个问题直到iOS 4.2.1才出现
重现步骤:
[actionSheet showFromTabBar:self.parentViewController.tabBarController.tabBar];
预期结果:
1. The UIActionSheet should dismiss itself, and the modal view should appear in front
实际结果:
1. The UIActionSheet does not get dismissed and the modal view appears behind it.
回归:
This problem was not apparent prior to iOS 4.2.1
注释:我尝试了其他显示 UIActionSheet 的方法,但所有这些方法都无法按预期工作:
//[actionSheet showInView:self.parentViewController.tabBarController.tabBar];
//[actionSheet showInView:[self.view window]];
//[actionSheet showInView:self.parentViewController.tabBarController.view];
//[actionSheet showInView:[UIApplication sharedApplication].keyWindow];
最佳答案
在整理示例以重现您的问题时,我查看了 UIActionSheet 委托(delegate)方法。我相信你可以使用:
actionSheet:didDismissWithButtonIndex:
而不是
actionSheet:clickedButtonAtIndex:
我还没有测试过它,但我相信您仍然会得到相同的按钮编号,并且直到操作表从 View 中消失后才会触发。
关于iphone - 模态视图 Controller 出现在操作表后面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4453391/
我来自 Asp.Net 世界,试图理解 Angular State 的含义。 什么是 Angular 状态?它类似于Asp.Net中的ascx组件吗?是子页面吗?它类似于工作流程状态吗? 我听到很多人
我一直在寻找 3 态拨动开关,但运气不佳。 基本上我需要一个具有以下状态的开关: |开 |不适用 |关 | slider 默认从中间开始,一旦用户向左或向右滑动,就无法回到N/A(未回答)状态。 有人
我是一名优秀的程序员,十分优秀!