AlvinfromDiaspar
AlvinfromDiaspar

Reputation: 6834

(XCode 7.1.1) How to center an ImageView?

I am having a difficult time understanding the new way of designing XIB layout (i.e. constraints).

I have seen some tutorials and lessons, yet I'm not sure why I'm not understanding any of it.

Here is my simple scenario that I want to achieve: a) I was a custom 'splash' screen that simply displays an ImageView that is vertically & horizontally centered (and retain aspect ratio). b) When I can achieve and understand (a), I would also like to add a label (or some other simple UI element) that also displays nicely across various screen sizes.

Question 1: What is the starting point to learning constraints, if indeed constraints is what I need to understand here.

Question 2: What references/tutorials/examples has worked well for you in understanding the new way of layout design?

Upvotes: 0

Views: 146

Answers (1)

tnev
tnev

Reputation: 386

This is, to my knowledge, the most recent Apple guide on learning Auto Layout. There's also this tutorial from Ray Wenderlich updated for iOS 9. There's no reason you shouldn't be able to accomplish what you're asking after reading through either or both of these.

Upvotes: 1

Related Questions