0

Yesterday I try to test my app on iphone 5 but bottom of my app is not responding. I searched this issue I found these solutions

Setting window.xib to "full screen at launch is not working" i dont know why.

self.view.frame = [UIScreen mainScreen].bounds; and this is need to be done on every view.

even this is not working for me self.window.frame = [UIScreen mainScreen].bounds;

All i need is a global solution, don't want to set on every view of my app.

Community
  • 1
  • 1
S.J
  • 3,063
  • 3
  • 33
  • 66

1 Answers1

0

Different UIViewControllers might demand different adjusts. Normally setting the Auto-Sizing on the Root UIView from a UIViewController's XIB to re-size on height works. But you should take care of each UIView independently... Some animations you might be doing, may rely on the total height of the UIView, so you should pay attention to that. I use this macro, to check what kind of device I am on:

#define IS_IPHONE_5 ( fabs( ( double )[ [ UIScreen mainScreen ] bounds ].size.height - ( double )568 ) < DBL_EPSILON )

It was taken from this, answer.

Community
  • 1
  • 1
Rui Peres
  • 25,741
  • 9
  • 87
  • 137