ios - UI elements disappearing out of screen in iPad -


i using code screen width , height of device can set layout screens.

cgrect screenrect = [[uiscreen mainscreen] bounds]; screenwidth = screenrect.size.width; screenheight = screenrect.size.height; 

now, when run on ipad value of screenwidth 768.00000 , of screenheight 1024.00000 seems right.

but when set frame of pagecontrol let's -

self.pagecontrol2.frame = cgrectmake(0, screenheight - 40, screenwidth, 20); 

the page control seems go outside screen on bottom side.

i hardcoded y-position of frame 600 , seems appear on bottom of screen intend to.

any idea why? must doing wrong... in advance.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -