ios5 - iPhone 4s and iPhone 5 compatibility -
i new iphone development want make code compatible iphone 4s , iphone5
when apply image background view of 4s size 320*480 changes in iphone 5. how manage compatibility? need manage compatibility buttons , position in iphone 4s , iphone 5. if yes? how handle position of button pro-grammatically...
i found solution ..
if(ui_user_interface_idiom() == uiuserinterfaceidiomphone){ cgsize result = [[uiscreen mainscreen] bounds].size; if(result.height == 480) { // iphone classic } if(result.height == 568) { // iphone 5 }}
does works?
yes, doing in correct way.
now, need is, need check condition , based on that, have set frame of components on screen.
if([uiscreen mainscreen].bounds.size.height == 568) { // iphone 5 // set frame of buttons iphone5 screen } else { // iphone 4 // set frame of buttons iphone4 & 4s screen } }
Comments
Post a Comment