1

Firstly, I know this problem has asked before, but with other versions of XCode and those solutions don't work for me. Secondly, I am a .NET programmer and I am currently learning Swift so please be patient.

ios app not fitting iphone 5 screen

So I made an app with Swift, it is all done and it works perfectly(does what it should), but it doesn't look so great and I can't solve it.

This is how the app looks in simulator for 5S

enter image description here

But this is how it looks in real life: enter image description here

I did made sure there is a Default-568h@2x.png image. I even deleted the launchimage

This is how the project looks like: enter image description here

enter image description here

enter image description here

I even set the size to 4 inch and no luck

enter image description here

Moreover, as I understood IOS should take care of fitting the app on different screen sizes with the above settings, but this is how it looks on 6 plus in the simulator: enter image description here

Community
  • 1
  • 1
Andrei Dobrin
  • 1,164
  • 4
  • 19
  • 35
  • Try simple stuff first like cleaning and rebuilding and deleting the app from the device. The iPhone 6 issue is probably your layout constraints (have you added any?) – Wain Feb 09 '15 at 07:56
  • Some of splash screens are missing, or the Default.png is missing. – iOSNoob Feb 09 '15 at 07:57
  • I cleaned the project, deleted the app from the phone and redownloaded it, but still no luck. I didn't added a constrain on the layout on purpose, I might have added them unknowingly. Where do I check for them? – Andrei Dobrin Feb 09 '15 at 08:00
  • Reset contents and settings of iOS simulator and then run it – Rahul Feb 09 '15 at 08:21
  • The problem is not the simulator. Even if I put the app on an Ipad, it still looks like that – Andrei Dobrin Feb 09 '15 at 08:46
  • Simulated metrics from IB are irrelevant, changing these values let you check how the view is supposed to be for different standard sizes, but you don't chose the final size there. The final size is governed by auto layout constraints, autoresizing masks or directly set frame depending on your implementation. An important thing to check is the size of the actual window of the application to see whether the window is downsized or it is just view: check `[UIApplication sharedApplication].keyWindow.bounds.size`. – A-Live Feb 09 '15 at 09:33
  • Have you set up autolayout constraints? – dopcn Feb 09 '15 at 09:36

1 Answers1

0

I have solved it, I don't know what I did different this time. I followed these steps: iOS launch image won't show up on iPhone or simulator, works on iPad

and it worked even though I did tried them before.... Sorry for the repost and thanks to all who have answered!

My advice for anyone else who encounters this problem is to firstly be careful with the settings, the images(their resolution) and follow those steps

Community
  • 1
  • 1
Andrei Dobrin
  • 1,164
  • 4
  • 19
  • 35