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

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -