Disable some animations on older macOS versions.

This commit is contained in:
Damiano Galassi committed 2017-08-30 10:59:40 +02:00
1 parent 2d4396b5fc
commit 264c2b6b4f
3 files changed
+31 -24

No files matched your search

+7 -2
View File
@@ -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: {