Skip to content

Commit

Permalink
OSX 10.11 버전에서도 동작하도록 수정
Browse files Browse the repository at this point in the history
아이콘이 신호없는 찻잔으로 고정되던 버그 수정
  • Loading branch information
taggon committed Jan 6, 2017
1 parent aa4442a commit f8e2b2c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Coffeefy.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
12 changes: 7 additions & 5 deletions Coffeefy/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}

Expand All @@ -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?) {
Expand Down
2 changes: 1 addition & 1 deletion Coffeefy/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>1.1</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>2</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.productivity</string>
<key>LSMinimumSystemVersion</key>
Expand Down

0 comments on commit f8e2b2c

Please sign in to comment.