Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to target iOS devices lower than a specific OS using @available [closed]

Tags:

ios

swift

I have a function that is aimed at iOS 11+ marked with the following:

@available(iOS 11.0, *)

Now I need to target a different function for iOS versions less than iOS 11. How do I write that?

like image 419
Tometoyou Avatar asked Dec 19 '22 01:12

Tometoyou


1 Answers

if #available(iOS 11.0, *) {} else {
    // do something (pre iOS 11.0)
}
like image 174
liquid LFG UKRAINE Avatar answered May 30 '23 13:05

liquid LFG UKRAINE