iosswift2newsstand-kitxcode7.1

'setNewsstandIconImage' is only available on iOS 9.0 or newer


I see the strange compile error:

'setNewsstandIconImage' is only available on iOS 9.0 or newer

But this method was available in ios 7 and 8 on Xcode 6.4. How to fix it?


Solution

  • I found a hack how to do this in Swift 2.2:

    UIApplication.sharedApplication().performSelector(Selector("setNewsstandIconImage:"), withObject: image)
    

    And you will have warning instead compile error.