if UIDevice.current.userInterfaceIdiom == .pad { // iPad } else { // not iPad (iPhone, mac, tv, carPlay, unspecified) }
let isiPhone = UIDevice.current.userInterfaceIdiom.rawValue == 0 ? true : false