Reputation: 235
At first i was making app for iPad, but then decided to make it universal but after i define screen size, like this :
#define IS_IPAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
#define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
#define IS_RETINA ([[UIScreen mainScreen] scale] >= 2.0)
#define SCREEN_WIDTH ([[UIScreen mainScreen] bounds].size.width)
#define SCREEN_HEIGHT ([[UIScreen mainScreen] bounds].size.height)
#define SCREEN_MAX_LENGTH (MAX(SCREEN_WIDTH, SCREEN_HEIGHT))
#define SCREEN_MIN_LENGTH (MIN(SCREEN_WIDTH, SCREEN_HEIGHT))
#define IS_IPHONE_4_OR_LESS (IS_IPHONE && SCREEN_MAX_LENGTH < 568.0)
#define IS_IPHONE_5 (IS_IPHONE && SCREEN_MAX_LENGTH == 568.0)
#define IS_IPHONE_6 (IS_IPHONE && SCREEN_MAX_LENGTH == 667.0)
#define IS_IPHONE_6P (IS_IPHONE && SCREEN_MAX_LENGTH == 736.0)
Now on iPad screen size shows up like it was for iPhone, every thing on screen are too small. Is that some kind of bug? or i did something wrong, how can i change it?
Upvotes: 1
Views: 84
Reputation: 920
iPad display iPhone parameter , the reason is that app screen size becomes zoom to fit on iPad screen, but actually it capturing iPhone screen size only.
To resolve this you need to make your app as Universal. In Xcode
->Target->General->Deployment Info->Device Select Universal.
Upvotes: 1