Looks like this is a duplicate of this issue:

https://bugs.swift.org/browse/SR-1486 <https://bugs.swift.org/browse/SR-1486>

I’m curious if anyone knows whether that is actually a bug, or a behavioural 
choice on Swift’s part?


> On 2 Aug 2017, at 10:31 am, Rod Brown via swift-users <swift-users@swift.org> 
> wrote:
> 
> Hi everyone,
> 
> Something I’ve come across in iOS 11 is that you can’t override properties 
> that are only available on iOS 11 when deploying with a deployment target 
> less than the current target.
> 
> For example the following code is invalid:
> 
> extension UIViewController {
>     
>     @available(iOS, introduced: 11.0)
>     open override var additionalSafeAreaInsets: UIEdgeInsets {
>         didSet {
>             // Do work here only relevant to iOS 11
>         }
>     }   
> }
> 
> This would be easily overridden in Obj-C, but I can’t do it in Swift. Is 
> there any reason why this limitation exists?
> 
> Thanks,
> 
> Rod
> _______________________________________________
> swift-users mailing list
> swift-users@swift.org
> https://lists.swift.org/mailman/listinfo/swift-users

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to