if UIDevice.current.userInterfaceIdiom == .pad { // iPad } else { // not iPad (iPhone, mac, tv, carPlay, unspecified) }