Question : Detect if device is ipad or iphone swift
Answered by : nayan-dave
if UIDevice.current.userInterfaceIdiom == .pad { // iPad } else { // not iPad (iPhone, mac, tv, carPlay, unspecified) }
Source : https://stackoverflow.com/questions/24059327/detect-current-device-with-ui-user-interface-idiom-in-swift | Last Update : Fri, 03 Jun 22
Question : Check if device is iPhone or not swift ios
Answered by : nayan-dave
let isiPhone = UIDevice.current.userInterfaceIdiom.rawValue == 0 ? true : false
Source : | Last Update : Fri, 29 Jul 22