ipad - UIPopovercontroller Parent? -
how can "perform selector" parentviewcontroller of uipopovercontroller? have uipopovercontroller lanuched uiviewcontroller, , uipopovercontroller includes other uiviewcontroller. can't seem reach parent view controller either popover or "internal" view controller.
i hope i'm being clear...
btw - parentviewcontroller doesn't work...
thanks!
there's no way directly uipopovercontroller
. you're going have pass reference parent view controller view controller you're managing popover controller:
// assumes these calls made within view controller , // myviewcontroller has property called previousviewcontroller myviewcontroller * myviewcontroller = [[[myviewcontroller alloc] init] autorelease]; myviewcontroller.previousviewcontroller = self; uipopovercontroller * popovercontroller = [[[uipopovercontroller alloc] initwithcontentviewcontroller:myviewcontroller] autorelease]; uibarbuttonitem * rightbarbuttonitem = self.navigationitem.rightbarbuttonitem; [popovercontroller presentpopoverfrombarbuttonitem:rightbarbuttonitem permittedarrowdirections:uipopoverarrowdirectiondown animated:yes];
something that, important point view controller (managed popover controller) has grab reference parent view controller before present popover.
Comments
Post a Comment