0

I have one project in which I had crated viewControllers with Xib each for iPad, iPhone5 and iPhone. I had named them like this XYZ.xib, XYZ_ipad.xib, XYZ_4.xib and they are just working fine. I didn't used Auto layout. Now I want to make this project compatible with iPhone 6 and 6+ . I am able to create the xib for iPhone 6 but how should i name it so that it is picked automatically like it is now being. I want to create new xib for iPhone 6 and 6+. Any other idea or help is appreciated.

Rana
  • 451
  • 4
  • 16
  • maybe it will not pick iphone 5 xib directly. check in code when you push viewcontroller check xib name will be different for iphone4 and iphone5. and `~ipad` is proper extention when you use xib so it will take your ipad xib directly. but still Autolayout is recommended. – ChintaN -Maddy- Ramani Nov 25 '14 at 05:12
  • @Chinttu-Maddy-Ramani can you tell me proper extension of iPhone 6 please. – Rana Nov 25 '14 at 05:18
  • i dont thnk so ther's any extention for iphone 6 and 6+ because autolayout is helpful and no need for different xib. you can take new xib example named "XYZ_6.xib" and "XYZ_6_L.xib" and when you use alloc init with nib name then check device size and pass that xib. like if device = 6 then XYZ_6 and if 6+ then XYZ_6_L. but if you need some changes in iphone then you have to change in all 4 xib. thats why i prefer to use Autolayout. for ipad extention is used when you create universal app so if your iphone xib = XYZ.xib then create ipad xib = XYZ~ipad.xib.then just pass XYZ. – ChintaN -Maddy- Ramani Nov 25 '14 at 05:22

0 Answers0