popviewcontroller

Push and Pop behaviour is strange, why?

自作多情 提交于 2019-12-02 15:50:03
问题 I have two classes, the one is addAlarm and second is Name,,, for now I am in addAlarm (addAlarm is subclass of UITableViewController), as it selects the row, then it goes to Name class as below Name *ob = [[Name alloc] initWithStyle:UITableViewStyleGrouped]; [self.navigationController pushViewController:ob animated:YES]; [ob release]; ob = nil; then there is UINavigationBar with addAlarm as back button by default, while Name is also subclass of UITableViewController I observe that when I

PopViewController strange behaviour

别来无恙 提交于 2019-12-02 00:35:23
Due to a weird request which I tried to turn down but it didn't work, I had to override the navigationBar's back Button. I have made a custom UINavigationController subclass and hacked the - (BOOL)navigationBar:(UINavigationBar *)navigationBar shouldPopItem:(UINavigationItem *)item method. Here is my code: @interface CustomUINavigationController () @end @implementation CustomUINavigationController #pragma mark - UINavigationBar delegate methods - (BOOL)navigationBar:(UINavigationBar *)navigationBar shouldPopItem:(UINavigationItem *)item { if ([[self.viewControllers lastObject] isKindOfClass:

Storing UITextField contents before view pops

痴心易碎 提交于 2019-11-30 18:20:35
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 textFieldShouldEndEditing or textFieldDidEndEditing , or the IB linked action textFieldEditingEnded

UINavigationController navigation stack problems in landscape mode

萝らか妹 提交于 2019-11-29 03:52:38
I have an iPhone application that I am currently converting to a universal binary to work with the iPad. I have successfully implemented everything I need in terms of layout so that full landscape functionality is now supported in my app (previously I primarily used portrait mode to display content). But, I have one strange problem, and it ONLY occurs in landscape mode: when I push a view controller onto the stack, it takes two taps on the back button to return to the previous view controller! The first tap shows a blank view, but with the same name on the left-side back navigation button, the

popping and pushing view controllers in same action

扶醉桌前 提交于 2019-11-28 03:56:22
is is possible to pop a view off the navigation stack and then push another straight onto it? I'm trying to implement a flat hierarchy for this section and would like to have a segmented controller but I can't make the segmented controller look anything liked I want, hence why I'm trying to use the navigation controller. When a button is clicked I executed this code: [[self navigationController] popViewControllerAnimated:YES]; MapsViewController *aViewController = [[MapsViewController alloc] initWithNibName:@"MapsViewController" bundle:nil]; [self.navigationController pushViewController

Change animation transition

落花浮王杯 提交于 2019-11-27 23:19:38
I got an app with NavigationController . How can i change animation transition style of pushViewController and popToViewController ? UPD I created category like in @lawicko answer. But i got error when i am trying to call function [self.navigationController pushViewController:places withCustomTransition:CustomViewAnimationTransitionPush subtype:CustomViewAnimationSubtypeFromLeft]; error is : "use of undeclared identifier 'CustomViewAnimationTransitionPush'" Where should i declare this part: typedef enum { CustomViewAnimationTransitionNone, CustomViewAnimationTransitionFlipFromLeft,

popping and pushing view controllers in same action

北慕城南 提交于 2019-11-27 05:14:53
问题 is is possible to pop a view off the navigation stack and then push another straight onto it? I'm trying to implement a flat hierarchy for this section and would like to have a segmented controller but I can't make the segmented controller look anything liked I want, hence why I'm trying to use the navigation controller. When a button is clicked I executed this code: [[self navigationController] popViewControllerAnimated:YES]; MapsViewController *aViewController = [[MapsViewController alloc]

Change animation transition

纵饮孤独 提交于 2019-11-27 04:40:12
问题 I got an app with NavigationController . How can i change animation transition style of pushViewController and popToViewController ? UPD I created category like in @lawicko answer. But i got error when i am trying to call function [self.navigationController pushViewController:places withCustomTransition:CustomViewAnimationTransitionPush subtype:CustomViewAnimationSubtypeFromLeft]; error is : "use of undeclared identifier 'CustomViewAnimationTransitionPush'" Where should i declare this part:

Can i pop to Specific ViewController?

醉酒当歌 提交于 2019-11-26 22:02:04
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 *x=[[FirstViewCtr alloc] initWithNibName:@"FirstViewCtr" bundle:nil]; [self.navigationController