Vamshi Krishna
Vamshi Krishna

Reputation: 989

iPhone App not showing up properly on iphone 6 simulator

My app works good on iphone 4s, 5 , 5s simulators. On iphone 6,it shows up weirdly. It does not occupy the entire screenenter image description here 4s simulator

What could be the issues?

Upvotes: 0

Views: 228

Answers (3)

Vamshi Krishna
Vamshi Krishna

Reputation: 989

Resolved the issue. Thanks for your valuable responses users.It has got nothing to do with Autolayout or autoresizing.

Just go to images.xcassets, right clicking in the navigator area, add launchImage. Then select your project (or target), go to general-->App Icons and Launch images and set Launch Images Source as Launch Image and most importantly, set Launch Screen file blank.

The app would now work well in iphone 6 simulator too. enter image description here

Upvotes: 1

Mike Sand
Mike Sand

Reputation: 2770

The black view is an added view? If the goal is just to set the background color, better to just set the color of the root view.

If you're not using autoLayout (and I don't reccomend it, it's more trouble than it's worth in most cases) one simple to handle different screeen sizes is programatically.

  1. Everything in the view in Interface Builder needs to be an outlet.
  2. in -viewDidLoad, set the center of each view. For example, to center the mobile number text: [self.enterYourMobileNumberLabel setCenter: CGMakePoint(self.view.center.x, self.enterYourMobileNumberLabel.center.y)]

You could also set the frame for more percise handling, etc., using margin constants. Frames are often more code and more cumbersome, but AutoLayout is a nightmare.

Upvotes: 1

Anbu.Karthik
Anbu.Karthik

Reputation: 82759

if you are using the Auto resizing just under stand the concept for example

assume that u have a book self , u need to layout the book in the book self so u need to do the following steps

  1. initially arrange the book self (this is your main View).

  2. arrange the all books in inside the book self where u need the location (this is your subview, buttons, labels, all UI Elements).

    u keep to follow the above two steps in always. got it

enter image description here

need reference follow the apple tutorial

this tutorial may also help u

Upvotes: 4

Related Questions