iphone - Having different locations of objects on a uiview -


i have application making uidatepicker , uitoolbar attached view. uitoolbar has animation set slide up. problem is. on iphone 4 toolbar needs finish animation @ lower position on iphone 5. how set height differently each device?

you can distinguish iphone 5 iphone 4 this:

if([[uidevice currentdevice] userinterfaceidiom] == uiuserinterfaceidiomphone && [uiscreen mainscreen].bounds.size.height == 568.0){     //is iphone 5 } else{     //is iphone 4 } 

then, set uitoolbar's frame appropriately each screen size.

also, here's macro convenience (put in .pch file):

#define is_4_inch_screen [[uidevice currentdevice] userinterfaceidiom] == uiuserinterfaceidiomphone && [uiscreen mainscreen].bounds.size.height == 568.0 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -