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 :: how to replace certain characters in string swift 
Swift :: swift remove space from string 
Swift :: swift set view order front 
Swift :: get device name swift 
Swift :: swift for loop index 
Swift :: how to flip or toggle boolean value in swift 
Swift :: random element from array swift 
Swift :: swift ui function with return value 
Swift :: get item filter count swift 
Swift :: swiftui navigation link with button 
Swift :: swift set uiimage color 
Swift :: swift wait 5 seconds 
Swift :: swift http request header 
Swift :: Swift Properties 
Swift :: swift how to animate constraint change 
Swift :: how do change title color in navigation bar 
Swift :: an in swift 
Swift :: porsche 
Swift :: go to view controller programmatically swift 
Swift :: how to set the center in view in swift 
Swift :: change background color of uitableview section header 
Swift :: swift pretty print json 
Swift :: turning an arrya into a set swift 
Swift :: Nested if...else Statement 
Swift :: Swift for-in Loop 
Swift :: swift switch 
Swift :: swift protocols 
Swift :: does swift language requires mac os system 
Swift :: get absolution position of view in swift 
Swift :: swift api call with certificate 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =