popviewcontroller

iOS: isMovingToParentViewController is not working as expected

自作多情 提交于 2020-01-13 08:25:09
问题 My setup is simple, and my issue is not very different from this one. However to better explain it I have posted it here: NavController -> VC1 -> VC2 VC1 is root view controller of NavController. VC2 is accessible via Push segue from VC1. I want to detect, within VC1, whether: It appeared directly as root view controller (via Push) It appeared as a result of VC2 being popped I read the docs which says following should tell me if later is true. isMovingToParentViewController == NO However that

prevent ios7 pan gesture to pop view controller

烈酒焚心 提交于 2020-01-03 03:29:08
问题 iOS 7 has introduced pan gesture to popViewController. It introductes problems with the sidebar that I am using so I want to prevent this new function of ios7. How can I cancel that behaviour? Thanks in advance 回答1: You can use yourNavigationController.interactivePopGestureRecognizer.enabled = NO; 来源: https://stackoverflow.com/questions/18975060/prevent-ios7-pan-gesture-to-pop-view-controller

Animating UINavigationController's 'back' button

六眼飞鱼酱① 提交于 2020-01-01 00:49:14
问题 I have a custom button on a view controller in the navigation controller's heirarchy, that when pressed, pops the visible view controller. I want to use UIView's transform property to animate the closing of the view controller. It works, but if I use `popViewControllerAnimated:YES', the default left slide of the animation is still there, though my custom transform also works. If I set popViewControllerAnimated:NO it doesn't animate anything at all. I also looked into using CATransition which

Can i pop to Specific ViewController?

十年热恋 提交于 2019-12-27 17:07:49
问题 I am using navigation based application. I push First ViewController to Second ViewController and from Second ViewController to Third ViewController. Now I want to pop from Third ViewController to First ViewController.I am performing this task using the below code but my application crashed. Please any body give me some proper guidelines. I can't use pop to rootViewController because it's different viewController. Thanks in advance... In Third ViewControler i have written this: FirstViewCtr

Can i pop to Specific ViewController?

南笙酒味 提交于 2019-12-27 17:05:59
问题 I am using navigation based application. I push First ViewController to Second ViewController and from Second ViewController to Third ViewController. Now I want to pop from Third ViewController to First ViewController.I am performing this task using the below code but my application crashed. Please any body give me some proper guidelines. I can't use pop to rootViewController because it's different viewController. Thanks in advance... In Third ViewControler i have written this: FirstViewCtr

Can i pop to Specific ViewController?

二次信任 提交于 2019-12-27 17:05:01
问题 I am using navigation based application. I push First ViewController to Second ViewController and from Second ViewController to Third ViewController. Now I want to pop from Third ViewController to First ViewController.I am performing this task using the below code but my application crashed. Please any body give me some proper guidelines. I can't use pop to rootViewController because it's different viewController. Thanks in advance... In Third ViewControler i have written this: FirstViewCtr

Can I “curl down” a page on popViewControllerAnimated?

谁说胖子不能爱 提交于 2019-12-22 17:44:08
问题 I can "curl up" a view controller with this code: [UIView beginAnimations:@"animation" context:nil]; [self.navigationController pushViewController:page animated:NO]; [UIView setAnimationDuration:1]; [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.navigationController.view cache:NO]; [UIView commitAnimations]; but I can't curl down the last page like this: [UIView beginAnimations:@"animation" context:nil]; [self.navigationController popViewControllerAnimated:NO];

pop and refresh viewcontroller

夙愿已清 提交于 2019-12-22 17:42:11
问题 I have three viewcontroller. when I get to the third viewcontroller, I use poptorootviewcontroller to pop to my first view controller, but when I use popviewcontroller in my third viewcontroller (i want to go back to my second viewcontroller) its poping but all the info that I edit in my second viewcontroller are there, and I want the secondviewcontroller to be new (reset this viewcontroller), like this viewcontroller to be reloaded. here is my code in the third viewcontroller: -(IBAction

popViewController does not autorotate back to allowed orientation

我与影子孤独终老i 提交于 2019-12-22 05:48:05
问题 I have two UIViewControllers, "A" and "B", where "A" overrides the shouldAutorotateToInterfaceOrientation to return YES for UIInterfaceOrientationPortrait, and "B" returns YES for all orientations. In my example "A" is the root navigation view controller, and I then use pushViewController for "B". After that I rotate the device into landscape, which successfully autorotates "B", then I pop "B" (back button or via popViewController) to return to "A". When targetting iPhone OS 3.1.3, "A"

Storing UITextField contents before view pops

非 Y 不嫁゛ 提交于 2019-12-18 19:33:44
问题 I am sure this is in the Apple documentation or must have been answered somewhere on this forum, since it seems so basic, but I could not find it nor a particularly elegant solution myself. What I have is a UIViewController that pushes an editing view on its navigation stack. The editing view has a bunch of UITextFields in it. If one of them is being editing when the back button is touched, the original view's ViewWillAppear method is called before either the UITextField delegate methods of