How to handle @available () to override protocol functions?

Scenario:
I am trying to filter iOS 10 code through
@available() and
if #available() .

I use @available () for the broader: classes and extensions .
But I get compiler errors for override functions :

enter image description here

Any solution?

+1
source share
1 answer

Looking at the headers of the UIPresentationController , presentationTransitionWillBegin is available as on iOS 8, so the compiler is confused in your declaration that your override is available from 10, while the method that it overrides is 8.0.

+1
source

Source: https://habr.com/ru/post/1012437/


All Articles