How can I create an if statement if device width is below 500

Viewed 37

At the moment I use UIdevice to either show tabBar or sideBar depending on if iPad or iPhone. e.g

if UIDevice.current.userInterfaceIdiom == .phone { 

and

if UIDevice.current.userInterfaceIdiom == .pad {

but I want it to use device width instead so in landscape mode on iPhone it shows the SideBar but I can't use device width as on iPad split view depnding on width I would like it to show tabbar.

and with this documentation here https://www.ios-resolution.com no phone is over 500 pts and no iPad is under.

0 Answers
Related