Search Results

Search found 442 results on 18 pages for 'uinavigationcontroller'.

Page 6/18 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • How to pushviewcontroller to a viewcontroller stored in a tabbaritem?

    - by Jann
    First of all I know this is a long question. REST ASSURED I have tried to figure it out on my own (see: StackOverflow #2609318). This is driving me BATTY! After trying and failing to implement my own EDIT feature in the standard moreNavigationController, I have decided to re-implement my own MORE feature. I did the following: Add a HOME view controller which I init with: initWithRootViewController Add 3 other default tabs with: ResortsListViewController *resortsListViewController; resortsListViewController = [[ResortsListViewController alloc] initWithNibName:@"ResortsListView" bundle:nil]; resortsListViewController.title = [categoriesDictionary objectForKey:@"category_name"]; resortsListViewController.tabBarItem.image = [UIImage imageNamed:@"whatever.png"]; resortsListViewController.navigationItem.title=@"whatever title"; localNavigationController = [[UINavigationController alloc] initWithRootViewController:resortsListViewController]; localNavigationController.navigationBar.barStyle = UIBarStyleBlack; [localControllersArray addObject:localNavigationController]; [localNavigationController release]; [resortsListViewController release]; Those work when i add them to the tabbar. (ie: click on them and it goes to the view controller) Then I add my own MORE view controller to the tabbar: MoreViewController *moreViewController; moreViewController = [[MoreViewController alloc] initWithNibName:@"MoreView" bundle:nil]; moreViewController.title = @"More"; moreViewController.tabBarItem.image = [UIImage imageNamed:@"more.png"]; moreViewController.navigationItem.title=@"More Categories"; localNavigationController = [[UINavigationController alloc] initWithRootViewController:moreViewController]; localNavigationController.navigationBar.barStyle = UIBarStyleBlack; [localControllersArray addObject:localNavigationController]; [localNavigationController release]; [moreViewController release]; Then tabBarController.viewControllers = localControllersArray; tabBarController.moreNavigationController.navigationBar.barStyle = UIBarStyleBlack; tabBarController.customizableViewControllers = [NSArray arrayWithObjects:nil]; tabBarController.delegate = self; That creates the necessary linkages. Okay, so far all is well. I get a HOME tab, 3 category tabs and a customized MORE tab -- which all work. in the MORE tab view controller I implement a simple table view that displays all the other tabs I have in rows. SINCE I want to be able to switch them in and out of the tabbar I created them JUST like i did the resortslistviewcontroller above (ie: as view controllers in an array). When I pull them out to display the title in the tableview (so the user can go to that "view") i simply do the following: // [myGizmoClass CategoryArray] holds the array of view controller tab bar items that are NOT shown on the main screen. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { ... etc... UIViewController *Uivc = [[myGizmoClass plusCategoryArray] objectAtIndex:indexPath.row]; cell.textLabel.text = [Uivc title]; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; } THIS is where it falls through: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { MyGizmoClass *myGizmoClass= [MyGizmoClass sharedManager]; UIViewController *tbi = [[myGizmoClass plusCategoryArray] objectAtIndex:indexPath.row]; NSLog(@"%@\n",[[tbi navigationItem ]title]); [self.navigationController pushViewController:tbi animated:YES]; } This is the error i get ("ATMs" is the title for the clicked tableview cell so i know the Uivc title is pulling the correct title and therefore the correct "objectatindex": 2010-04-09 11:25:48.222 MouseAddict[47485:207] ATMs 2010-04-09 11:25:48.222 MouseAddict[47485:207] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Pushing a navigation controller is not supported' BIG QUESTION: How do i make the associated VIEW of the UIViewController *tbi show and get pushed into view? I am GUESSING that the UIViewController is the correct class for this tbl .. i am not sure. BUT i just wanna get the view so i can push it onto the stack. Can someone plz help?

    Read the article

  • UIPopoverController w/ UINavigationController Subview contentSizeForViewInPopover doesnt work on Par

    - by Abbacore
    I have a UIPopoverController with a subclass UINavigationController. Both the parent and child views are UITableviews. When i call parent view originally with contentSizeForViewInPopover = (320,480) it works great. When i click into the child view i resize the popover to contentSizeForViewInPopover = (320,780) When return back to the parent view i cannot get the popover to resize back to contentSizeForViewInPopover = (320,480). the popover stays at the (320,780) size. Been trying everything but just missing something. Anyone know how resize the view with UIPopoverControllers in the above scenario? Thanks in Advance!!

    Read the article

  • TTThumbsViewController + navigationController issue

    - by michael
    Hi, .. 2 questions. I am only using Three20 for a gallery in my app. When I push my .. : TTThumbsViewController from another view, the navigation bar is not the color I want it to be (as per the rest of my app). I have set up a TTDefaultStyleSheet as per this stackoverflow QA. Is there something special I have to do as I am only using the TTThumbsViewController? The thumbs view is also created with extra space at the top, as though it is leaving room for a navigation controller, without knowing that one is already there. How can I tell the TTThumbsViewController to use the existing uinavigationcontroller? Or behave as though it is? MYThumbsViewController *mYThumbsViewController = [MYThumbsViewController alloc]; [self.navigationController pushViewController:mYThumbsViewController animated:YES]; The problem depicted graphically: Thanks!

    Read the article

  • AdMob and UINavigationControllers

    - by Ward
    I'm playing around with AdMob and I"m trying to get something going with an auto-rotating view inside a uinavigationcontroller. I have the ad at the top of the screen. Not sure if this is the right approach, but in my LoadView method I have: self.navigationController.view.frame = CGRectMake(0,48,320,432); The navbar appears below the ad. When I rotate the phone to landscape is there a way to get the navbar (which is now across the top) to be 432px wide so it doesn't get cut off under the ad? I tried writing a method that is called when the device orientation changes, but it seems like manipulating the view on the navigationcontroller screws things up for every orientation except portrait. The view keeps getting shorter until it disappears. Thanks, Howie

    Read the article

  • Popover with embedded navigation controller doesn't respect size on back nav

    - by quixoto
    I have a UIPopoverController hosting a UINavigationController, which contains a small hierarchy of view controllers. I followed the docs and for each view controller, I set the view's popover-context size like so: [self setContentSizeForViewInPopover:CGSizeMake(320, 500)]; (size different for each controller) This works as expected as I navigate forward in the hierarchy-- the popover automatically animates size changes to correspond to the pushed controller. However, when I navigate "Back" through the view stack via the navigation bar's Back button, the popover doesn't change size-- it remains as large as the deepest view reached. This seems broken to me; I'd expect the popover to respect the sizes that are set up as it pops through the view stack. Am I missing something? Thanks.

    Read the article

  • UISearchBar and UINavigationController

    - by Calvin L
    I have an .xib file connected to a ViewController, which is init'ed as the root controller of an instance of UINavigationController in my appDelegate. In that view, I have a UISearchBar and a UITableView below it. When the view loads up, there's a navigationBar at the top, followed by a ~20 pixel gap, and then the UISearchBar, and the table beneath it: My problem is that when I enter the UISearchBar to type something, the navigation bar disappears (which is fine), but the search box is all screwy: I'm pretty new to this (a couple of weeks), so I'm not quite sure what's going on. Can anyone help me shed some light on this?

    Read the article

  • How to HIDE the iPad keyboard from a MODAL view controller?

    - by Cal
    I'm trying to hide the iPad keyboard from a modal view controller but it doesn't work. I have tried resignFirstResponder but that doesn't have any affect if we are in a modal view controller. I tried resignFirstResponder in a non-modal UINavigationController with the very same UIViewController and the keyboard hides correctly. Does anyone know how solve this problem? Thanks. [Update] it looks like there's something wrong with my code because the resignFirstResponder does work (I made a simple test case instead of using my code). But I still don't know what the problem is.

    Read the article

  • Adding UIBarButtonItem to UINav..Controller

    - by mlecho
    i am not sure what i am missing here. I Have a custom UINavigationController and i am trying to add a persistant UIBarButtonItem to the bar. -(void)viewDidLoad { self.navigationBar.barStyle = UIBarStyleBlack; UIBarButtonItem *bbi = [[UIBarButtonItem alloc] initWithTitle:@"Nope..." style:UIBarButtonItemStyleBordered target:self action:@selector(goBack:)]; self.navigationItem.leftBarButtonItem =bbi; [bbi release]; } -(void)goBack:(id)sender { NSLog(@"go back now"); } what am i missing here? - BTW, i do not want to/ will not use IB.

    Read the article

  • Invalid argument exception - Navigation bar, tab bar, UIView.

    - by Tejaswi Yerukalapudi
    Class 1 has the following code that generates the exception - -(IBAction) searchAllAction: (id) sender { AddDiagSearchController *search = [[AddDiagSearchController alloc] initWithNibName:@"DiagSearch" bundle:nil]; [self.navigationController pushViewController:search animated:YES]; } the pushViewController part generates the following exception - 2010-04-14 14:03:31.060 Nav[10314:207] *** -[UIView addTarget:action:forControlEvents:]: unrecognized selector sent to instance 0x3956a80 And the class I'm trying to push has the following code. All the connections for IBOutlets were made through the interface builder. It's has a tableView, search text bar and a tabbar at the bottom and I'll be adding this to a UINavigationController. @interface AddDiagSearchController : UIViewController <UITableViewDataSource, UITableViewDelegate>{ UIBarButtonItem *quickAdd; UIBarButtonItem *searchAll; UITextField *searchTxt; } @property (nonatomic, retain) IBOutlet UITextField *searchTxt; -(IBAction) searchAllClicked:(id) sender; -(IBAction) quickAddClicked:(id) sender; -(IBAction) searchBtnClicked; -(IBAction) resignResponder: (id) sender; @end

    Read the article

  • Weird Scrolling Issue Using UITableView

    - by Scott Elder
    I am a working UINavigationController pushing two different UITableViews on and off the stack. All of my functionality is working correctly except scrolling. When either table is scrolled above the top row, or below the bottom row, it stays there exposing the margin above/below the table. I am looking for the table to "bounce" back so that only the table is visible and not the white space area beyond - just like any other iPhone app. One of my UITableViews is being loaded by NIB and the other is being created programatically - both of which have the exact same result. I have tried all the bounce and scrolling settings in the Nib, but nothing seems to work. Can someone tell me what I am doing wrong? Please let me know if I can be more specific in detailing my problem. Thanks, -Scott

    Read the article

  • UITabBarController "More" tab issues

    - by codemonkey
    I've got a UITabBarController with 7 tabs. Each of the 7 tabs has its own UINavigationController and customizes its toolbar. When a view is loaded via the UITabBarController's "More" menu its custom toolbar isn't appearing. If i switch the order of the views around so that the same view is now accessible from the UITabBar without going through the "More" menu then the custom toolbar shows up like it's supposed to. Is there a way to customize a NavigationController's toolbar when that NavigationController is loaded via the "More" menu of a TabBarController? I'm actually also interested in replacing the "More" menu navigation controller with my own custom one on views loaded via the "More" menu... not sure whether that's even possible. Any feedback will be appreciated.

    Read the article

  • Setting Grouping in UITableView under UINavigationController

    - by climbon
    In my UINavigationController app, my first view is a UITableView. I can't seem to find a way to set the property of this UITableView to 'grouped'. Since UITableView is dynamically generated I don't have the luxury of Interface Builder. Searched forums here and googled other places and closest I saw was to override either initWithStyle or initWithCoder as follows. (id)initWithStyle:(UITableViewStyle)style { if (self = [super initWithStyle:UITableViewStyleGrouped]) { } return self; } However this above function never gets called. when I overrided initWithCoder I could see it worked and I was able to change UITableView contents to grouped. But then title automatically became 'Root View Controller' and none of the cells were active anymore although they got grouped fine. That is while they looked active but if you click on them, those cells won't do anything. But I have seen apps which have their very first view being UITableView is grouped. So there must be a way to do it but I don't know how.

    Read the article

  • iPhone: Setting Navigation Bar Title

    - by Arthur Skirvin
    Hey all. I'm still pretty new to iPhone development, and I'm having a bit of trouble figuring out how to change the title of my Navigation Bar. On another question on this site somebody recommended using : viewController.title = @"title text"; but that isn't working for me...Do I need to add a UINavigationController to accomplish this? Or maybe just an outlet from my UIViewController subclass? If it helps, I defined the navigation bar in IB and I'm trying to set its title in my UIViewController subclass. This is another one of those simple things that gives me a headache. Putting self.title = @"title text"; in viewDidLoad and initWithNibName didn't work either. Anybody know what's happening and how to get it happening right? Thanks!

    Read the article

  • iPhone: Using a Singleton with Tabview Controller and Navigation Controller

    - by malleswar
    Hi Friends, I have developed a small iPhone application by using singleton that I use to navigate through the views. Here is a sample method from my singleton class. + (void) loadMenuController:(NSMutableArray *)menuItems{ MenuViewController *menuViewControler = [[MenuViewController alloc] initWithNibName:@"MenuViewController" bundle:nil]; [menuViewControler setMenuItems:menuItems]; RootViewController *root = ( P2MAppDelegate *appDelegate = (P2MAppDelegate*) [[UIApplication sharedApplication] delegate]; UINavigationController *navController = [appDelegate navigationController]; [navController pushViewController:menuViewControler animated:YES]; [menuViewControler release]; } Now my requirement has changed to require a tab view controller . I could change my application delegate to a tabview controller but I still need to navigate inside each tab. I am unable get a clue how to navigate from my singleton class. Please guide me. Please let me know if my query is not clear. Thanks in advance. Regards, Malleswar

    Read the article

  • UIViewController is popped from view stack and NSURLConnection crashes the application

    - by rickharrison
    I am pushing a UIViewController onto a UINavigationController. This view controller immediately starts a download of an xml feed and then parses it. However, if you hit the back button before it is done downloading, and crashes with EXC_BAD_ACCESS. The line that is crashing it is in parserDidEndDocument and is this line: if (self.delegate && [self.delegate conformsToProtocol:@protocol(ModelDelegate)]) [self.delegate modelDidFinishParsing:self]; I assume it is crashing because it is trying to access self.delegate which is not assigned anymore. How do I get around this? Also, I would release the model object in the modelDidFinishParsing method. How would I release this model if it never reaches this method.

    Read the article

  • Getting a SIGABRT error in dismissModalViewController

    - by mcalleja
    Im receiving a SIGABRT error when I cancel a MFMailComposeViewController, exactly in the dismissViewController, don't work I have a UIViewController within a UINavigationController. My Code: - (void)sendMail { if ([MFMailComposeViewController canSendMail]) { controller = [[MFMailComposeViewController alloc] init]; [[controller navigationBar] setTintColor:[UIColor getHexColorWithRGB:@"e2de09" alpha:1.0f]]; controller.mailComposeDelegate = self; [controller setSubject:@"Subject"]; NSString *msg="xxxxx"; [controller setMessageBody:msg isHTML:YES]; [self presentModalViewController:controller animated:YES]; } else { NSString * errorString = [NSString stringWithFormat:@"mail account not set."]; UIAlertView * errorAlert = [[UIAlertView alloc] initWithTitle:@"Error:" message:errorString delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [errorAlert show]; } } The presentModalViewController:animated: works correctly. - (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error { [self becomeFirstResponder]; [self dismissModalViewControllerAnimated:YES]; } But calling [self dissmissModalViewControllerAnimatedLYES] causes a SIGABRT error.

    Read the article

  • popViewController does not autorotate back to allowed orientation

    - by JoeGaggler
    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" returns to the portrait orientation as expected. When targetting iPhone OS 3.2, I have two side-effects: "A" is displayed in landscape. The navigation bar does not update even though "A" is now displayed. The navigation bar still shows the items for "B". Only after trying to go back/pop one more time will the navigation bar animate to show the items for "A". If I instead attempt to push "B" again and go back, I have to pop twice before the navigation bar animates to show the items for "A". During these "intermediate pops" the view for "A" remains displayed. While researching this issue, I have seen other answers suggesting performing the rotation manually ([UIDevice setOrientation] or via a tranformation), however this does not help understand what the problem is, especially why it behaves differently between the two OS's. So my question is: must all of my UIViewControllers on the UINavigationController stack support exactly the same orientations going forward? And if not, then is there something that I need to do to make it behave as it did for OS 3.1.3?

    Read the article

  • pushViewController Not Displaying UIView/Nib with tabbar and nav bar

    - by james
    I'm relatively new to objective c but not programming and am stuck with my iphone app. I created a nav based app with both a navbar and a tab bar controller. I set the tab bar as the root controller. I'm able to switch between each tab without any issues to various UIViews and UITableViews. My issue is that in one of my UITableViews that I call from the TabBarController, didSelectRowAtIndexPath function is suppose to display a new UIView. The below code does not give any errors and runs fine but does not show the new Nib. if(newViewController == nil) { NSLog(@"yes nil"); BookViewController *aNewViewController = [[BookViewController alloc] initWithNibName:@"BookOptionView" bundle:nil]; self.newViewController = aNewViewController; [aNewViewController release]; } BookAppDelegate *delegate = (BookAppDelegate *)[[UIApplication sharedApplication] delegate]; [delegate.appNavBar pushViewController:newViewController animated:YES]; Now when I do the below, it works fine but it gets rid of the nav and tab which I'm assuming because its a modal call instead of pushing the view controller. BookViewController *screen = [[BookViewController alloc] initWithNibName:@"BookOptionView" bundle:[NSBundle mainBundle]]; screen.modalTransitionStyle = UIModalTransitionStyleCoverVertical; [self presentModalViewController:screen animated:YES]; [screen release]; Any ideas why I can't get the View Controller to push correctly? In my application delegate file, I declared an AppNavBarController object (inherit from UINavigationController) called appNavBar. Any help would be appreciated!

    Read the article

  • Loading data from a dictionary of dictionaries into an array in Objective C for an iphone app

    - by Kat
    I have a UINavigationController consisting of a tableview I want to load some data into. I have a dictionary plist containing Dictionaries for each Train Line which in turn have dictionaries for each station with the relevant information along with one string lineName. I need to collect the station Names keys and add them to an array to populate my table (This is working). The line names are stored as a string in my lines dictionary with the key being "lineName" Root->| | |->TrainLine1(Dictionary)->| | |-> lineName (String) | |-> Station1 (Dictionary) | |-> Station2 (Dictionary) | | |->TrainLine2(Dictionary)->| | |-> lineName (String) | |-> Station1 (Dictionary) | |-> Station2 (Dictionary) Am I going about this the wrong way? Should I reorganise my plist? The code below crashes the app. - (void)viewDidLoad { self.title = @"Train Lines"; NSString *path = [[NSBundle mainBundle] pathForResource:@"lineDetails" ofType:@"plist"]; NSDictionary *dictionary = [[NSDictionary alloc] initWithContentsOfFile:path]; NSMutableArray *array = [[NSMutableArray alloc] init]; NSMutableArray *lineNameArray = [[NSMutableArray alloc] init]; NSString *key; for (key in dictionary) { NSMutableDictionary *secondDictionary = [NSDictionary dictionaryWithDictionary:[dictionary valueForKey:key]]; [lineNameArray addObject:key]; NSLog(@"Adding this in array:%@", key); [array addObject:[secondDictionary objectForKey:kLineNameKey]]; } self.trainLines = array; self.trainLineKeys = lineNameArray; NSLog(@"Array contents:%@", self.trainLineKeys); [lineNameArray release]; [array release]; [dictionary release]; [super viewDidLoad]; }

    Read the article

  • UITabBarController with viewControllers utilizing different orientations?

    - by RickiG
    Hi I can see that this is something that has been troubling a lot of people:/ I have a UITabBarController that has 4 viewControllers, all of type UINavigationController. One of the navigationControllers gets a viewController pushed onto its stack, this viewController should be presented in landscape mode/orientation. The viewController is a graph, it is the absolutely only place in the app where landscape makes sense. (I hide the UITabBar when this is presented to not lead the user to believe this will work everywhere) To make a UITabBarController respond correctly to changes in orientation all its viewControllers need to return the same value from the delegate method: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation So to accomodate this behavior I have implemented this method in all the viewControllers belonging to the UITabBarController: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; BOOL canRotate = [defaults boolForKey:@"can_rotate"]; return canRotate; } The "trick" is now that when my can-be-landscape viewController is pushed I do this: - (void) viewWillAppear:(BOOL)animated { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [defaults setBool:YES forKey:@"can_rotate"]; [defaults synchronize]; } and when it is popped, I do this: - (void) viewWillDisappear:(BOOL)animated { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [defaults setBool:NO forKey:@"can_rotate"]; [defaults synchronize]; } This works really well. When the viewController is on the stack I can rotate the device and the view follows. The problem is however, that if the user taps the "back" button on the navigationBar while in landscape mode, thus popping the viewController to the previous viewController, this "old" viewController is of course also in landscape mode. To make things worse, because I set the BOOL to NO, this "old" viewController can not rotate back when I orientate the device to portrait mode. Is there a way to update everything so that none of my other viewControllers will be in landscape mode when I pop the can-be-in-landscape mode viewController? I am a bit worried that if this could be done from landscape to portrait it should also be possible from portrait to landscape, thus making my "hack" unnecessary.. but if it can not, then I am back to square one :/ Hope I am close and that someone could help me get there, thanks:)

    Read the article

  • Switching between 2 UINavigationControllers

    - by Smikey
    Hi all, I seem to have a problem switching between 2 UINavigationControllers, i.e. one which controls the main (selection) menu of my application, and the second which controls the main session (i.e. the user can't go back to the selection menu once they're started a new session). The first works just fine, but I get into trouble when trying to load the second. I have a class called GameViewController which contains the second UINavigationController instance. I set this up as usual, linking it as an IBOutlet to the delegate and setting up the NavController in the GameViewController.xib file with its 'Class' property pointing at GameScreenViewController (my main game screen), and its NIB Name property pointing to the GameScreenViewController nib file. I then create a new instance of GameViewController and load it. In IB, the navigation controller looks fine, with its View 'loaded from "GameScreenViewController"', however when the NavigationController is loaded in the game, it actually loads the GameViewController's UIWindow instance (just a blank window). I'm not sure how to make it load the Navigation Controller's view rather than its own window? Also, another quick question. When I load the second navigation controller from the first, which makes more sense to use: [self.view addSubview:gameViewController.view]; or [self presentModalViewController:gameViewController animated:YES]; Thanks for any help, much appreciated :D Michael

    Read the article

  • Act on click of a button on the Nav Bar for moreNavigationController -- Can't pushviewcontroller

    - by Jann
    Okay, here is my issue: My app has a display of categories in the tab bar at the bottom of the iPhoneOS screen. This only allows 5 categories before it presents the MORE button. I have over 25 (please do not answer this by saying: "Rethink your application...etc" -- that was rudely said before. They are food, drink, etc categories and cannot be changed). I want to allow the user to put their favorites on the home page. The Apple moreNavigationController editing system only allows 20 tab bar items to be rearranged due to space constraints on the editing page. This is not enough so i need to implement my own Editing screen. I set the rightBarButtonItem to nil and created my own. Using NSLog, i can see the "click" happens when clicking the EDIT button, but I cannot push using pushViewController. Nothing happens. I think it has something to do with the navigationController I am addressing...but i am not sure. ps: This all happens in my App Delegate which DOES act as both UITabBarControllerDelegate & UINavigationControllerDelegate. I tried to do the following: - ( void )navigationController:( UINavigationController * )navigationController_local willShowViewController:( UIViewController * )viewController_local animated:( BOOL )animated { UIViewController * currentController = navigationController_local.visibleViewController; UIViewController * nextController = viewController_local; // Do whatever here. NSLog(@"Nav contoller willShowViewController fired\n'%@'\n'%@'\nThere are currently: %d views on the stack\n",currentController,nextController,[self.navigationController.viewControllers count]); if ( [nextController isKindOfClass:NSClassFromString(@"UIMoreListController")]) { UINavigationBar *morenavbar = navigationController_local.navigationBar; UINavigationItem *morenavitem = morenavbar.topItem; morenavitem.rightBarButtonItem = nil; NSLog(@"Is a UIMoreListController\n"); UIBarButtonItem *editTabBarButton = [[UIBarButtonItem alloc] initWithTitle:@"Edit" style:UIBarButtonItemStylePlain target:self action:@selector(editTabBar:)]; morenavitem.rightBarButtonItem = editTabBarButton; [editTabBarButton release]; } } This works to place an EDIT button at the top right of the screen -- mimicking Apple's look and feel... but when that button is clicked, you cannot exit the darn moreNavigationController. I have tried many things. UIAlerts work, etc...but pushing (or popping -- even popping to root view) a view controller on the stack does not. - (void) editTabBar:(id)sender { NSLog(@"clicked edit tabbar\n"); NSLog(@"Total count of controllers: %d\n",[self.navigationController.viewControllers count]); TabBarViewController *tabBarViewController2 = [[TabBarViewController alloc] initWithNibName:@"TabBarView" bundle:nil]; tabBarViewController2.navigationItem.title=@"Edit Tab Bar"; [self.navigationController pushViewController:tabBarViewController2 animated:YES]; [tabBarViewController2 release]; NSLog(@"finished edit tabbar\n"); } If you click the edit button on the moreNavigationController's display page, you get the log entries like expected AND (this is strange) the views on the stack climbs -- but no page change occurs. I marked it down to not using the correct navigation controller...but I am lost on how to find which one TO use. this is a weird one too. In the edit function if i just do this: - (void) editTabBar:(id)sender { self.tabBarController.selectedIndex = 0; } It DOES take me home (to tabbarcontroller 0) BUT doing this: - (void) editTabBar:(id)sender { [self.navigationController popToRootViewControllerAnimated:YES]; } does not work. Does the moreNavigationController have some special quality that screws with the rest of the system?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >