UIDevice-Hardware Category on UIDevice to determine exactly what device model your code is running on. This is adapted from this gist.