Closed florentmorin closed 3 years ago
I haven’t looked yet at what’s needed to make the library compatible with the major platform updates, also for compatibility with dark mode and iPad apps on the Mac.
At least one problem right now is that SPM doesn’t support resources so there’s more work involved than just “enabling” support. Will try to look as this soon.
Dark mode support would be really appreciated!
Currently I kind of hacked it together with the following code in AlertView.swift
s createBackground
method:
var style: UIBlurEffect.Style = .extraLight
if #available(iOS 13, *) {
if self.traitCollection.userInterfaceStyle == .dark {
style = .dark
}
}
let backgroundView = UIVisualEffectView(effect: UIBlurEffect(style: style))
Probably a bit too basic :)
Realistically I think that's probably the only way to implement this. I have a hunch that Apple is using custom effects to implement their alert backgrounds but reverse engineering that isn't really worth anyone's time.
any news about SPM support?
No updates. I think the xibs in this project would need to be converted to code first but I have no concrete plans for doing so. Feel free to submit a PR though!
You are probably right, but in new Swift 5.3 SPM will support bundles, so maybe there will be a option to load xibs from resources. They should publish it in June I think
https://github.com/apple/swift-evolution/blob/master/proposals/0271-package-manager-resources.md
Feel free to submit a PR though!
I'll give it a try!
Did you plan to support Swift Package Manager integrated into Xcode 11?