You generally want to avoid adding layout constraints for specific devices. Size classes and orientations are better because they are more flexible. If however you really need to do that (and in some cases it may be unavoidable if you have a really specific layout), then you can use UIDevice
and a few other mechanisms to do so (including simply getting the size of the screen and comparing it against the known height, which in this case is 480 points. Simply use this code in an if
statement when you are setting up your constraints and change them accordingly. You do need to set up your constraints in code for this to work.
As for your second question, there are a few ways to center a view this way, the most common one that comes to mind is using a UILayoutGuide
(or if you support < iOS 9, an invisible spacer view). You can do this in interface builder or in code pretty simply. Something like this should do it:
// Assuming you have a view called topView, a root view which are already configured and a myLabel view, this code only covers the vertical aspect of the layout
let guide1 = UILayoutGuide()
view.addLayoutGuide(guide1)
let guide2 = UILayoutGuide()
view.addLayoutGuide(guide2)
// space above the label
guide1.topAnchor.constraint(equalTo: topView.bottomAnchor).isActive = true
// space below the label
guide2.bottomAnchor.constraint(equalTo: view.bottomAnchor).isActive = true
// make the spaces equal
guide1.heightAnchor.constraint(equalTo: guide2.heightAnchor).isActive = true
myLabel.topAnchor.constraint(equalTo: guide1.bottomAnchor).isActive = true
myLabel.bottomAnchor.constraint(equalTo: guide2.topAnchor).isActive = true