- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我有密码
- (void)matchmakerViewController:(GKMatchmakerViewController *)viewController didFindMatch:(GKMatch *)match
{
[menuViewController dismissModalViewControllerAnimated:YES];
[GameKitWrapper getSingleton].match = match;
match.delegate = [GameKitWrapper getSingleton].remotePlayer;
[menuViewController presentModalViewController:avatarSelectionViewController
animated:YES];
}
但我有一个问题,解雇有效但现在无效。当我将 dismissModalViewControllerAnimated:YES 更改为 dismissModalViewControllerAnimated:NO 它有效但看起来不太好。
感谢任何帮助。
最佳答案
@adam 的想法是正确的,但您不想等待任意延迟。这很脆弱,因为完成动画可能需要任何时间。你想等待前一个 View Controller 真正完成关闭。根据我的经验,放置它的最佳位置是在当前 View Controller 的 viewDidAppear:
中。这将在您的模态完全消失后调用。参见 this question对于一些解决类似问题的示例代码。
关于iphone - 在 dismissModalViewControllerAnimated 之后调用 presentModalViewController 有问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5848023/
如果我将一个 View 推送到 Navcontroller 上,它工作得很好,我可以使用代码或使用 Nav Controller 后退按钮从它返回。 然后我将其更改为以模态方式呈现 View 。预设有
我有一个带有 UINavigationController 的 UITabbarController。 NavigationController 中的 View 呈现一个 MVC (AddClockN
这个问题在这里已经有了答案: dismissmodalviewcontrolleranimated is deprecated first deprecated in ios 6 (3 个答案) 关
我的应用程序是创建 csv 文件并通过邮件发送。但是当我丢弃邮件时,我会黑屏。之前的 View 没有出现,并被黑屏覆盖。在stack overflow中查看了各种问答。但似乎没有任何效果。 - (IB
我刚刚升级到 XCode 4.5 以更新我的 iOS 应用程序以在 iPhone 5 的 4 英寸显示屏上运行,但我收到构建错误提示 dismissModalViewControllerAnimate
有没有办法实现自己的机制来检测 dismissModalViewControllerAnimated 何时消失?我试过 viewdiddisappear,但这并没有被调用,因为我认为它仅在从 View
我想从完成 block 内弹出一个显示,但我也想从同一 block 内关闭 dismissModalViewControllerAnimated(但在弹出窗口完成之后)。请注意,弹出窗口计划并在完成
我有一个 XIB,我将其呈现为模态视图。我有一个调用以下内容的按钮 - (IBAction)dismissVC:(id)sender { [self.parentViewController
我正在尝试使用 dismissModalViewController:Animated: 关闭我的 View ,但无论我尝试什么,它都没有关闭它。您可以在底部的 hideSplash 方法中看到我试图
我的表格 View 有问题。当关闭出现在其顶部的模态视图 Controller 时,它总是滚动到顶部。我已经尝试使用 KVO 观察 contentOffset 的变化,但是让我的观点困惑的是它。 在
有没有办法知道 dismissModalViewControllerAnimated 何时启动以及何时完成(例如 viewWillAppear 和 viewDidAppear 的成语)?与其他动画不同
我有一个 UIViewController 派生类,它使用 dismissModalViewControllerAnimated:(BOOL) 方法,如下所示: [self dismissModalV
捕获图像后,回调发生,但出现错误,因为它没有关闭相机 View 。我的代码非常简单,我唯一的疑问是我使用的是选项卡栏 Controller 并将 imagePicker 推送到其中一个选项卡中,这只是
作为我的应用程序启动的一部分,我循环使用多个 View Controller 。一切正常,但 View Controller 未发布。 (永远不会调用 viewDidUnload 和 dealloc
在我的应用委托(delegate)中,我实例化了一个 iAd 横幅并将其分配给一个委托(delegate)属性,然后加载主视图 Controller 。 在主视图 Controller 中,我将 iA
我正在调用 presentModalViewController 的应用程序一旦完成(调用 dismissModalViewControllerAnimated:YES )它应该立即调用 popToR
我让dismissModalViewControllerAnimated 在以下设置中正常工作,但对为什么它在self(modalViewController)而不是parentViewControl
在我的应用程序中,我以模态方式在 View 之间切换。我的问题是,当我从第一个 viewController 移动到第二个时,它起作用了。当我第一次拒绝第二种观点时,这也有效。你说哪里有问题?它来了。
我有一个类(称为类 A)创建另一个类(称为类 B)的实例。在 A 类中,我从 B 类调用一个函数,该函数打开相机以读取 QR 码。一旦检测到 QR 码,将使用此行关闭摄像头馈送: [[[[[UIApp
当我使用 dismissModalViewControllerAnimated 时,我无法在我的 TableView 中重新加载数据,但是如果我使用 pushViewController,它会完美运行
我是一名优秀的程序员,十分优秀!