Aria
Aria

Reputation: 393

UIView shows perfect on iPhone but not on iPad

I am pretty new to iOS development and I am able to create views and controllers. I have been testing using my iPhone and other sizes of iPhone and they look great. I tried once on an iPad but it was a border around the screen like in this image. enter image description here

I constrained to margins and I did not give any height or width constraints so it could stretch properly. It also looks good on the storyboard viewing so what could I be doing wrong? Can't seem to find any resource online to help.

Upvotes: 0

Views: 131

Answers (2)

Prashant Tukadiya
Prashant Tukadiya

Reputation: 16416

This is default behaviour when you run iphone app in ipad

This happened because your app is supported iphone only . Tap on your project and select universal if you want to add support for both iphone and ipad.

Other option is you can check requires full screen check box but it will still show black bar

Note: However you are developing iPhone Only app but it is compulsory to check that everything works fine in ipad because apple review team will also check that in ipad and your app may be rejected if something is not proper

enter image description here

Upvotes: 1

Rizwan
Rizwan

Reputation: 3666

May be you have made an iPhone app. Try to change the setting to Universal app in the xcode settings. Normally iPhone app shows scaled on iPad, which is same as in your case.

Select Projet in xcode -> General Setting

Deployment Info in Project Settings

Upvotes: 1

Related Questions