iphone - Help with UIPopOverController size -


so have view bunch of button in uiscrollview. when user presses button, want uipopovercontroller display pointing @ selected button. kind of works, popover wrong size , points random point in view. here code. in advance.

-(void)detail:(id)sender{     uibutton *button = sender;     nslog(@"tag = %i", button.tag);      uinavigationcontroller *navcontroller = [[uinavigationcontroller alloc] initwithrootviewcontroller:viewcontroller];     if (ui_user_interface_idiom() == uiuserinterfaceidiompad) {     self.popover = [[uipopovercontroller alloc] initwithcontentviewcontroller:navcontroller];     self.popover.delegate = self;     [self.popover presentpopoverfromrect:button.bounds inview:self.view permittedarrowdirections:uipopoverarrowdirectionany animated:yes]; } 

than problem size of popover: in view inside popover, have:

self.contentsizeforviewinpopover = scroll.contentsize; nslog(@"%f, %f", scroll.contentsize.height, scroll.contentsize.width); nslog(@"showing: %f, %f",  self.contentsizeforviewinpopover.height,  self.contentsizeforviewinpopover.width); 

and both logs matching. think should work correctly. doesn't. here screen shot. let me know if need more of code. in advance.

screen shot of error

regarding size of popover only: managed variable heighted uilabel:

uilabel *hinweis; hinweis.text = @"..."; hinweis.frame = cgrectmake(x,y,width,800); [hinweis sizetofit]; 

and arrow: have tried different inview param self.parentviewcontroller.view?


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -