From f8e2b2c2bece63f7fd8d4556c841598c0a150a01 Mon Sep 17 00:00:00 2001 From: Taegon Kim Date: Fri, 6 Jan 2017 18:20:50 +0900 Subject: [PATCH] =?UTF-8?q?OSX=2010.11=20=E1=84=87=E1=85=A5=E1=84=8C?= =?UTF-8?q?=E1=85=A5=E1=86=AB=E1=84=8B=E1=85=A6=E1=84=89=E1=85=A5=E1=84=83?= =?UTF-8?q?=E1=85=A9=20=E1=84=83=E1=85=A9=E1=86=BC=E1=84=8C=E1=85=A1?= =?UTF-8?q?=E1=86=A8=E1=84=92=E1=85=A1=E1=84=83=E1=85=A9=E1=84=85=E1=85=A9?= =?UTF-8?q?=E1=86=A8=20=E1=84=89=E1=85=AE=E1=84=8C=E1=85=A5=E1=86=BC=20?= =?UTF-8?q?=E1=84=8B=E1=85=A1=E1=84=8B=E1=85=B5=E1=84=8F=E1=85=A9=E1=86=AB?= =?UTF-8?q?=E1=84=8B=E1=85=B5=20=E1=84=89=E1=85=B5=E1=86=AB=E1=84=92?= =?UTF-8?q?=E1=85=A9=E1=84=8B=E1=85=A5=E1=86=B9=E1=84=82=E1=85=B3=E1=86=AB?= =?UTF-8?q?=20=E1=84=8E=E1=85=A1=E1=86=BA=E1=84=8C=E1=85=A1=E1=86=AB?= =?UTF-8?q?=E1=84=8B=E1=85=B3=E1=84=85=E1=85=A9=20=E1=84=80=E1=85=A9?= =?UTF-8?q?=E1=84=8C=E1=85=A5=E1=86=BC=E1=84=83=E1=85=AC=E1=84=83=E1=85=A5?= =?UTF-8?q?=E1=86=AB=20=E1=84=87=E1=85=A5=E1=84=80=E1=85=B3=20=E1=84=89?= =?UTF-8?q?=E1=85=AE=E1=84=8C=E1=85=A5=E1=86=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Coffeefy.xcodeproj/project.pbxproj | 4 ++-- Coffeefy/AppDelegate.swift | 12 +++++++----- Coffeefy/Info.plist | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Coffeefy.xcodeproj/project.pbxproj b/Coffeefy.xcodeproj/project.pbxproj index 108c74c..8eba1c9 100644 --- a/Coffeefy.xcodeproj/project.pbxproj +++ b/Coffeefy.xcodeproj/project.pbxproj @@ -359,7 +359,7 @@ DEVELOPMENT_TEAM = PJ627876A5; INFOPLIST_FILE = Coffeefy/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.11; PRODUCT_BUNDLE_IDENTIFIER = kim.taegon.Coffeefy; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 3.0; @@ -376,7 +376,7 @@ DEVELOPMENT_TEAM = PJ627876A5; INFOPLIST_FILE = Coffeefy/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.11; PRODUCT_BUNDLE_IDENTIFIER = kim.taegon.Coffeefy; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 3.0; diff --git a/Coffeefy/AppDelegate.swift b/Coffeefy/AppDelegate.swift index 99e3a51..3dd372f 100644 --- a/Coffeefy/AppDelegate.swift +++ b/Coffeefy/AppDelegate.swift @@ -89,11 +89,13 @@ class AppDelegate: NSObject, NSApplicationDelegate { func startAnimatingStatusImage() { currentIconIndex = 0 - updateStatusImage(index: 0) + updateStatusImage(index: currentIconIndex) - animTimer = Timer.scheduledTimer(withTimeInterval: 4.0/15.0, repeats: true){ timer in - self.currentIconIndex = ( self.currentIconIndex + 1 ) % 4 - self.updateStatusImage(index: self.currentIconIndex) + if #available(OSX 10.12, *) { + animTimer = Timer.scheduledTimer(withTimeInterval: 4.0/15.0, repeats: true){ timer in + self.currentIconIndex = ( self.currentIconIndex + 1 ) % 4 + self.updateStatusImage(index: self.currentIconIndex) + } } } @@ -105,7 +107,7 @@ class AppDelegate: NSObject, NSApplicationDelegate { } func updateStatusImage(index: Int) { - loadStatusImage(name: "coffeefy\(currentIconIndex)") + loadStatusImage(name: "coffeefy\(index)") } @IBAction func openPreference(sender: AnyObject?) { diff --git a/Coffeefy/Info.plist b/Coffeefy/Info.plist index 5b09d51..0fa7da4 100644 --- a/Coffeefy/Info.plist +++ b/Coffeefy/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString 1.1 CFBundleVersion - 1 + 2 LSApplicationCategoryType public.app-category.productivity LSMinimumSystemVersion