It doesn't work. What I'm asking is how to compile code containing new iOS 26 API using Xcode 16, which doesn't support these new APIs?
This code does not compile, I get an error: Value of type 'UIBarButtonItem' has no member 'sharesBackground'.
if #available(iOS 26.0, *) {
addBtn.sharesBackground = false
}
I had to use this solution but it seems flimsy.
#if compiler(>=6.2)
if #available(iOS 26.0, *) {
addBtn.sharesBackground = false
}
#endif
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: