Laying out UIViews for different devices/size classes

I've never had to design a UI to adapt to any possible device, orientation, and account for potential multitasking layouts, and i'm a bit stuck.

Traditionally my layout code would go something like:
  • Declare views at the top of view Controller

  • Initialize Views in setupViews function

  • Add constraints in setupConstraints function

  • Override viewWillTransition function to change constraints based on orientation

My primary trouble is in the sizing of UI Components. What width and height should I assign to any given, let's say button, if that button is to be displayed on any device in any orientation? On iPad, it would be too small if I lay it out for an iPhone, and the same issue vice-versa.

My main question: How do I assign sizes to views so that they look "good" on every device?

Secondary question: How do any of you with production app development experience design and layout views to look good in every possible configuration?

Laying out UIViews for different devices/size classes
 
 
Q