jjzjj

dismissViewControllerAnimated

全部标签

ios - dismissViewControllerAnimated : not animating

我正在使用SVWebViewController.当我在这里展示ViewController时SVModalWebViewController*webViewController=[[SVModalWebViewControlleralloc]initWithAddress:address];webViewController.webDelegate=self;[selfpresentViewController:webViewControlleranimated:YEScompletion:nil];ViewController如预期的那样从底部向上滑动。然而,当ViewContro

ios - 使用 dismissViewControllerAnimated 传回数据

我有一个FirstViewController和一个SecondViewController。我在FirstViewController中创建了一个按钮,以便模态地执行到SecondViewController的segue。在SecondViewController中,我有一个显示8项列表的tableView,当我从该列表中选择一个项目时,我dismissViewControllerAnimated:,返回到FirstViewController。我想做的是将一个字符串传递回FirstViewController。我将这篇文章用作我的代码的引用:dismissModalViewCont

ios - dismissViewControllerAnimated :completion: not executed

当我调用dismissViewControllerAnimated:completion:关闭UIViewController时,当相应的View位于在屏幕上显示动画(使用presentViewController:animated:completion:)。UIViewController甚至没有消失。这就像dismissViewControllerAnimated:completion:被忽略了。以下代码是一个简化的代码示例,因为原始代码要大得多。我在下面给出的代码模拟了一个用例,其中网络通信错误可能会触发一个View弹出,而另一个View也同时弹出。代码示例:NSLog(@"Pr

ios - 不调用 dismissViewControllerAnimated 完成 block

我正在尝试关闭这样的ViewController:[composeViewControllerdismissViewControllerAnimated:YEScompletion:^{NSLog(@"Hello");//Neveroutputted}];ViewController被关闭,但出于某种原因从未调用完成block。我从来没有遇到过不使用其他ViewController调用完成block的任何问题。虽然这个ViewController是“特殊的”,因为它是作为subviewController添加的(我之前没有在我的应用程序中使用过)。这是否会产生任何副作用,为什么不调用完

ios - dismissViewControllerAnimated 导致 EXC_BAD_ACCESS - swift

我试图用dismissViewControllerAnimated(true,completion:{})关闭UIViewController,但我在尝试这样做时得到了EXC_BAD_ACCESS。(也就是说,其工作的10次中有1次)。我使用了一个自定义的transitionDelegate,当我不设置它时,它会工作。ListTransitionDelegate返回动画器和presentationController。PresentationController看起来像这样init(presentingViewController:UIViewController!,presented

ios - dismissViewControllerAnimated :completion: causing memory crash

所以我正在开发一个应用程序,如果我没有在应用程序默认值中存储用户名,我会从基本View启动登录View。letdefaults=NSUserDefaults.standardUserDefaults()if!defaults.objectForKey("username"){dispatch_async(dispatch_get_main_queue(),{self.navigationController.tabBarController.performSegueWithIdentifier("Login",sender:self)})}该代码在我的Storyboard中触发了一个“

ios - dismissViewControllerAnimated 自定义动画

我试图用自定义动画调用dismissViewControllerAnimated,但它似乎不起作用。当我像这样呈现ViewController时:cameraUI=UIImagePickerController()cameraUI.delegate=selfcameraUI.sourceType=UIImagePickerControllerSourceType.CameracameraUI.mediaTypes=[kUTTypeImage]cameraUI.allowsEditing=falsecameraUI.showsCameraControls=falsevartranslat

ios - DismissViewControllerAnimated EXC_Bad_ACCESS 为真

我正在按照苹果从WWDC发布的教程“查看ViewController内部”进行操作,以创建自定义ViewController(此处为视频:https://developer.apple.com/videos/wwdc/2014/,示例代码为:https://developer.apple.com/library/ios/samplecode/LookInside/Introduction/Intro.html)。我主要是复制他们的objective-C并将其逐行翻译成Swift,除了用手势点击隐藏覆盖viewController之外,我几乎已经开始工作了。当我打电话时:funcdimm

ios - dismissViewControllerAnimated 将所有 View Controller 关闭到 root [swift]

假设我有4个ViewController第1页----showdetail---->第2页---->第3页----showdetail---->第4页我想使用self.dismissViewControllerAnimated(true,completion:nil)从第4页返回到第3页。它在iOS9中运行良好,但当我在iOS8设备中尝试时,它会将所有ViewController关闭到第1页 最佳答案 您可能想使用PresentModally转场而不是ShowDetail。这里对每种segues都有很好的解释What'sthedif

ios - dismissViewControllerAnimated 不会释放 viewcontroller

首先:我的项目启用了ARC,并且我正在使用Storyboard。我有一个推送segue(模态)的ViewController,[selfperformSegueWithIdentifier:@"goInitialSettings"sender:self];我正在设置一些参数并存储它们。存储参数后(真正的按钮点击),应用程序应返回到原始ViewController。这是我用这个命令做的:[self.presentingViewControllerdismissViewControllerAnimated:NOcompletion:^{}];我注意到我关闭的ViewController从不