presentviewcontroller

push view controller after dismissing presented view controller

青春壹個敷衍的年華 提交于 2019-12-22 01:05:46
问题 I have this navigation stack RootVC ---> VC1 --> (presenting)-> ModalVC and I have VC2 (not in navigation stack). When presenting ModalVC , I want to click on button in my ModalVC to dismiss ModalVC, then push VC2 into the navigation stack after VC1 at one click. It should look like this: RootVC ---> VC1 ---> VC2 I tried a lot of methods to make it, but pushing event fire only, when I return to my RootVC . I tried to make it with delegates: In ModalVC on click: [self

iOS 8: Presenting a modal view controller in portrait causes resize of the navigation bar of the underlying landscape navigation controller

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-20 12:43:24
问题 On iOS 8 I have a strange behavior regarding the navigation bar and orientation changes. I have a navigation controller which reports a supported interface orientation UIInterfaceOrientationMaskLandscapeRight . The navigation bar has the expected height for landscape orientation (sadly I am not entitled to post screenshots). Then I initiate a modal presentation of a view controller that only supports UIInterfaceOrientationMaskPortrait . When the presentation animation starts, it seems that

presentViewController in AppDelegate with delay in iOS8

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-20 09:49:01
问题 So I had a full working solution in iOS7 that displays a LoginViewController via presentViewController in the AppDelegate's didFinishLaunching. Basically I am doing something like this: UIViewController *backgroundViewController = ... self.window.rootViewController = backgroundViewController; [self.window makeKeyAndVisible]; [self.window.rootViewController presentViewController:loginViewController animated:NO ...] In iOS8 I see a jump. First I see the backgroundViewController then after about

modal View controllers - how to display and dismiss

时光毁灭记忆、已成空白 提交于 2019-12-17 02:25:39
问题 I'm breaking my head for the last one week on how to solve the issue with showing and dismissing multiple view controllers. I have created a sample project and pasting the code directly from the project. I have 3 view controllers with their corresponding .xib files. MainViewController, VC1 and VC2. I have two buttons on the main view controller. - (IBAction)VC1Pressed:(UIButton *)sender { VC1 *vc1 = [[VC1 alloc] initWithNibName:@"VC1" bundle:nil]; [vc1 setModalTransitionStyle

How to dismiss a navigation controller presented from another navigation controller in iOS 10 and below?

夙愿已清 提交于 2019-12-13 20:08:24
问题 I'm presenting a UINavigationController from another UINavigationController like this: let customNavigationController = CustomNavigationController() customNavigationController.viewControllers = [myController] customNavigationController.modalPresentationStyle = .custom self.navigationController.present(customNavigationController, animated: true, completion: nil) Then, when a "close" button tapped, I try to dismiss it like this: navigationController.dismiss(animated: true, completion: nil) That

presentViewController with the tabbar

余生颓废 提交于 2019-12-13 04:42:38
问题 I have a app which has a tabbar which is presented in most of the ViewControllers . The problem is its not showing in an viewController which i'm presenting by this code. UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:songsViewController]; [self presentViewController:navigationController animated:YES completion:nil] I'm using the presentViewController instead of the pushViewcontroller , cause i want to customize the navigationBar in

Send email from Xamarin.Forms app using Dependency Service

我与影子孤独终老i 提交于 2019-12-12 03:53:15
问题 In my app, for debugging purposes and testing purposes I need to send an email. How do I present the mail controller, when the class that sends it does not contain a definition for PresentViewController ? The class needs to fire off the email app after the user clicks "yes" from the alert which fires. public async Task<bool> SendEmail(Exception ex) { var result = await SendNotificationToRequestSendingEmail(); if (result) { if (MFMailComposeViewController.CanSendMail) { mailController = new

Slow transitions on presenting a viewcontroller

試著忘記壹切 提交于 2019-12-12 01:36:23
问题 I am calling [self.navigationController pushViewController:controller animated:YES]; and it works just fine, but there is a delay in how long it takes to present. The controller is just a simple blank tableview. This view is being presented as a normal push. 回答1: Found the issue thanks to instruments and @dasdom. Apparently there was a animation going on at the same time that was causing issues. 来源: https://stackoverflow.com/questions/23790678/slow-transitions-on-presenting-a-viewcontroller

dismissViewControllerAnimated:completion: on iOS 8

纵然是瞬间 提交于 2019-12-10 21:53:10
问题 In iOS <= 7, directly after calling dismissViewControllerAnimated:completion: would result in presentedViewController being nil . In iOS 8, presentedViewController still points to the presented viewcontroller, right until the completion block is executed. [self dismissViewControllerAnimated:NO completion:^{ //self.presentedViewController is nil }]; //self.presentedViewController is nil on iOS 7, but not nil on iOS 8 So in iOS 8 we cannot rely on the property presentedViewController in order

viewDidAppear and viewDidDisappear not called when modalPresentationStyle=UIModalPresentationCustom

≯℡__Kan透↙ 提交于 2019-12-08 12:59:34
问题 I need to do a custom presentation animation and when i set both these setTransitioningDelegate and modalPresentationStyle=UIModalPresentationCustom The animation is perfect with unless the viewDidAppear and viewDidDisappear is not called in the presenting viewcontroller.This is same for Apple sample code in https://developer.apple.com/library/ios/samplecode/LookInside/Introduction/Intro.html [overlay setTransitioningDelegate:[self transitioningDelegate]]; overlay.modalPresentationStyle