Disable some animations on older macOS versions.
This commit is contained in:
3 files changed
+31
-24
No files matched your search
@@ -121,8 +121,13 @@ import Cocoa
|
||||
|
||||
if window.isVisible && animate {
|
||||
NSAnimationContext.runAnimationGroup({ context in
|
||||
context.allowsImplicitAnimation = true
|
||||
context.duration = duration
|
||||
if #available(OSX 10.11, *) {
|
||||
context.allowsImplicitAnimation = true
|
||||
context.duration = duration
|
||||
}
|
||||
else {
|
||||
context.duration = 0
|
||||
}
|
||||
window.layoutIfNeeded()
|
||||
view.isHidden = true
|
||||
}, completionHandler: {
|
||||
|
||||
Reference in new issue
Block a user