ios - ActionSheet displaying well below view -


i attempting have actionsheet contains pickerview display @ bottom of screen across multiple devices (iphone4/5 namely). assume make display flush @ bottom of screen, want y origin of actionsheet @ height of view (push way bottom) minus height of actionsheet (to move on y axis).

this showing actionsheet below bottom of screen.

code:

[actionsheet setframe:cgrectmake(0, self.view.frame.size.height - 294, 320, 294)];  nslog(@"%f %f %f %f",       self.view.frame.origin.x,self.view.frame.origin.y,       self.view.frame.size.width,self.view.frame.size.height); 

nslog spitting out: `0.000000 0.000000 320.000000 372.000000

so 372-294 actionsheet 78, gives? logic flawed.

which view passing in when call

showinview:(uiview*)view 

sounds may passing in wrong view , offsetting position incorrectly.

to add on this, shouldn't have deal uiactionsheet's frame. should position accordingly you.

[_myactionsheet showinview:[[[uiapplication sharedapplication] delegate] window]]; 

will make show @ bottom of window.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -