lj279
lj279

Reputation: 339

How can i create common xib for all ipads and iphones without creating seprate xibs for iphone and ipad? Not storyboard

Current xib's showing layout issues while switching between devices. I need single xibs which support all ios devices instead of using storyboard.

Upvotes: 0

Views: 46

Answers (1)

Emel Elias
Emel Elias

Reputation: 572

If you are using xcode 7.3 and above you can vary the constraints based on size class

https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/AutolayoutPG/Size-ClassSpecificLayout.html

for xcode 8 there are some updation but underlying concept is size class , please check this

http://www.appcoda.com/auto-layout-guide/

https://makeapppie.com/2016/09/05/an-introduction-to-size-classes-for-xcode-8/

Upvotes: 1

Related Questions