ios - Can a ViewController presented modally use the NavigationController's toolbar -


i'm trying present modally uitableviewcontroller view controller in navigation controller hierarchy. modal view should display toolbar.

can navigation controller's managed toolbar used in view controllers presented modally or should implement own toolbar these?

  • if present controller modally [self.navigationcontroller presentmodalviewcontroller:filtervc animated:yes]; no toolbar displayed.
  • if pushed controller with: [self.navigationcontroller pushviewcontroller:filtervc animated:yes]; toolbar displayed.

here method run init method of uitableviewcontroller.

    -(void)configuretoolbar {      [self.navigationcontroller settoolbarhidden:no animated:yes];      //toolbaritem done     uibarbuttonitem *doneitem = [[uibarbuttonitem alloc] initwithbarbuttonsystemitem:uibarbuttonsystemitemdone                                                                               target:self                                                                                action:@selector(donebuttonpressed)];      //toolbaritem cancel     uibarbuttonitem *cancelitem = [[uibarbuttonitem alloc] initwithbarbuttonsystemitem:uibarbuttonsystemitemcancel                                                                                  target:self                                                                                 action:@selector(cancelbuttonpressed)];     //flexible space     uibarbuttonitem *flexibleitem = [[uibarbuttonitem alloc] initwithbarbuttonsystemitem:uibarbuttonsystemitemflexiblespace target:nil action:nil];      self.toolbaritems = [nsarray arraywithobjects:flexibleitem, cancelitem, doneitem, flexibleitem, nil];      [doneitem release];     [cancelitem release];     [flexibleitem  release]; } 

no, can't, because modal view controller becomes child view controller displays it, , view controller subview of navigation controller (i.e. modal view has no connection navigationcontroller's hierarchy). can present navigation controller modal view controller, though, can pass custom navbar buttons it.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -