Witterquick
Witterquick

Reputation: 6140

storyboard - Image size too big when running app

I have two png files: logo.png (97x47 px) and [email protected] (197x95 px) All I have in the storyboard is a view and an imageView on it, with the logo image. When I'm setting the image to logo, and add constrains to be in the center, when I'm running the app - the image is very large. I've tried to set it to Aspect Fit but it wasn't the problem.

I'm running it on iPhone 6 (so I guess it's using the [email protected])

What could cause this?

Upvotes: 1

Views: 323

Answers (1)

David Ansermot
David Ansermot

Reputation: 6112

You have to set 4 contraints :

  1. Fixed width
  2. Fixed height
  3. Align center X
  4. Align center Y

After this, you should name your big image "[email protected]", you forgot the "x".

Example (UIActivityIndicator 37x37 centered on view) :

enter image description here

Upvotes: 1

Related Questions