I want to update my application to ios 6. so how to set the frame size comfortable both iphone 4 and iphone 5?
I can using Calculate the Screen size then to adjust the height of the view like using following method
+(CGFloat)heightOf:(CGFloat)heightValue{
CGRect applicationFrame = [[UIScreen mainScreen] applicationFrame];
//NSLog(@"applciation Frame height = %f",applicationFrame.size.height);
CGFloat heightRatio = (heightValue/480)*100;
CGFloat height = (applicationFrame.size.height * heightRatio)/100;
return height;
}
then I am using like as
UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0,[Height heightOf:385], 320, 220)];
and so. Thanks for your Replies
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With