Reputation: 223
Previously, it is only an iPhone application. Now I want it run in iPad as well. So I chose the target as universal, but when I run it in iPad simulator. It only remains the color of the view without any labels and textfields.
How can I make the application run properly both in iPad and iPhone?
Upvotes: 2
Views: 1082
Reputation: 13600
Step 1 : First You need to change your size Class to wAny x hAny. Now when you open your controller all your controls will be visible as disabled, Because you change your size class and constraints defined are not compatible with it.
Step 2 : Now select all your controls in your controller then goto bottom of Attribute Inspector. You will see checkbox for C x Any. uncheck it.
Step3 : Now you have to add new Constraint for Any x Any. As you have already changed your size class to **Any x Any ** just check above check box which will by default activate constrains for current size class.
Step 4 : Then you need to add missing constraints which ever necessary for your controls.
Upvotes: 3