ios - Getting warning message while using PopoverController on iPad -
i have 2 view controllers – aviewcontroller , bviewcontroller. bviewcontroller's view used aviewcontroller's subview:
bviewcontroller *bviewcontroller = [mainstoryboard instantiateviewcontrollerwithidentifier:@"basic"]; [self.view addsubview: bviewcontroller.view];
...so can display bviewcontroller's data on aviewcontroller handle data in bviewcontroller. in bviewcontroller use uipopovercontroller when press button on it, displaying this:
_popovercontroller = [[uipopovercontroller alloc] initwithcontentviewcontroller:_popcontentview]; [_popovercontroller presentpopoverfromrect:sender.frame inview:sender.superview permittedarrowdirections:uipopoverarrowdirectiondown animated:yes];
i'm getting warning message:
presenting view controllers on detached view controllers discouraged
how can resolve problem?
since showing uipopovercontroller
in subview . show uipopovercontroller
in viewcontroller .
Comments
Post a Comment