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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -