Search
 
SCRIPT & CODE EXAMPLE
 

SWIFT

Detect if device is ipad or iphone swift

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

Check if device is iPhone or not swift ios

let isiPhone =  UIDevice.current.userInterfaceIdiom.rawValue == 0 ? true : false
Comment

PREVIOUS NEXT
Code Example
Swift :: swift share with 
Swift :: toggle in swift 
Swift :: play sound in swift 5 
Swift :: swift has Top Notch 
Swift :: update cell value swift 
Swift :: swift get app version and build 
Swift :: UI API called on a background thread 
Swift :: swift scrollview hide scrollbar 
Swift :: remove divider list swiftui 
Swift :: xcode label rotate text 
Swift :: swiftui navigation link with button 
Swift :: white or light ASAuthorizationAppleIDButton “Sign in with Apple” button - Swift 
Swift :: how to get rid of excess space in swift 
Swift :: swiftui scrollview hide scrollbar 
Swift :: set color for uibutton programmatically swift 
Swift :: swift button 
Swift :: swift setinterval 
Swift :: swift scrollview scroll to bottom 
Swift :: swift string to dictionary 
Swift :: Delete Realm database swift 
Swift :: swiftui actionsheet 
Swift :: swft ui image 
Swift :: swift change navigation bar title 
Swift :: add callbacks to view swiftui 
Swift :: Swift Character Example 
Swift :: swift guard statement 
Swift :: two integer variable in swift 
Swift :: printf in swift 
Swift :: swiftui divider remove padding 
Swift :: swift conditional statements 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =