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

php - How can I edit my code to echo the data of child's element where my search term was found in, in XMLReader? -

jQuery Ajax Render Fragments OR Whole Page -

java - Why is BlockingQueue.take() not releasing the thread? -