ios - iPad: Content view is not resized to fit popover -
i'm having trouble presenting content view in popover. i'm using following code set popover view controller instantiate storyboard. view controller in i'm presenting popover within navigation controller :
myviewcontroller *viewcontroller = [self.storyboard instantiateviewcontrollerwithidentifier:@"myviewcontroller"]; viewcontroller.contentsizeforviewinpopover = cgsizemake(382, 502); uipopovercontroller *popover = [[uipopovercontroller alloc]initwithcontentviewcontroller:viewcontroller]; self.popovercontroller = popover; //self.popovercontroller private property of type uipopovercontroller [self.popovercontroller presentpopoverfrombarbuttonitem:self.navigationitem.leftbarbuttonitem permittedarrowdirections:uipopoverarrowdirectionany animated:yes];
here comes problem: when tap left bar button popover shows in correct size correct content, content view not resized size of popover. snippet of content view "covered popover" visible.
i'm having same procedure table view, working perfectly-the table fitted popover. tried set size of popover controller itself, suggested here. , tried out settings springs , struts of affected view controller. outcome same.
now run out of ideas try out, or i'm possibly doing wrong/missing...help :(
thanks in advance!
a tableview adjusts size of container view controller put in. feature of uitableviewcontroller. when present tableview uipopovercontroller, popover determines size table.
this mechanism not work views, need set size of view well.
Comments
Post a Comment