uiview - iOS presentViewController is not working right -


as part of updating apps replace deprecated presentmodalviewcontroller presentviewcontroller, did testing. found disturbing. whereas presentmodalviewcontroller works , there no question working, have found presentviewcontroller method not display vc @ all. there no animation , never shows up. loadview called without problems, actual view not appear.

so here doing:

  • user taps button in main view controller.
  • in callback tap, create new view controller , display shown above.
  • the vc never appears (it intermittent problem though) because vc begins playing audio, know loadview called, looks follows.

my button-pressed callback follows:

  - (void) buttontapped: (id) sender {   vc *vc = [[vc alloc] init];   [self presentviewcontroller: vc animated:yes completion: nil];   [vc release];   } 

here loadview in vc class:

 - (void) loadview {  uiview *v = [uiview new];  self.view = v;  [v release];  ... create , addsubview various buttons etc here ...  } 

thanks.

make sure controller calls function has view displayed (or parent 1 displayed) , should work.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -