Adapting UIButton sizes to iphone 6 and 6 plus

332 views Asked by At

I am a little lost here.

Consider in a landscape mode I have 3 UIButtons which are of equal widths aligned next to each other with a gap and the occupy the entire space of the screen. These buttons were added programatically with fixed button sizes.

All looks fine and nice in a iPhone4s screen. Now comes the iphone6+. The way I am determining the button sizes is

buttonWidth = 21.f * [[UIScreen mainScreen] scale]; 

And then the button seems to fit good for the iPhone 6+ screen and covers the full area.

  1. Will it work for iPhone 6 as well ?
  2. Is this the right approach? How do i determine different sizes for the buttons for different screen sizes? Yes, I know adaptive layout, but we still have to specify the button sizes, dont we?

Help would be great appreciated.

0

There are 0 answers