I cannot figure out how to get these images to centre. I like how I got them resizing accordingly for each device but would like to have them sit in the centre. I feel like I'm missing something super obvious but after a week of daily 1-2 hour sessions of trying... I give up.
If the link (Centre 4 Images) to my screenshot works, you can see they are fitting to each device just fine, only not centred.
Put the imageviews (1,2,3,4) inside a UIView (say ContentView) and give it two constraints - Top space to container, and Center horizontally in container.
I'm assuming that you're imageViews are set up in such a way (having height, and bottom and top space to container constraints) that they would provide the height of ContentView.
That would help you center ContentView containing all the four images.
Hope that helps. Let me know if that works for you.
Asked in February 2016Viewed 3,164 timesVoted 13Answered 1 times