diff --git a/.DS_Store b/.DS_Store index bd3ae55..b5f03fe 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 95f51b9..0000000 --- a/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -# xcode noise -*.mode1v3 -*.pbxuser -*.perspective -*.perspectivev3 -*.pyc -*~.nib/ -build/* - -# Textmate - if you build your xcode projects with it -*.tm_build_errors - -# old skool -.svn - -# osx noise -.DS_Store -profile diff --git a/PomoTimer.xcodeproj/project.pbxproj b/PomoTimer.xcodeproj/project.pbxproj index 5c72352..ad24c68 100644 --- a/PomoTimer.xcodeproj/project.pbxproj +++ b/PomoTimer.xcodeproj/project.pbxproj @@ -7,13 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 2C41B8FD178BF3410065AB62 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2C41B8FC178BF3410065AB62 /* SenTestingKit.framework */; }; - 2C41B8FE178BF3410065AB62 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CC2A48416A3D0010037CF76 /* UIKit.framework */; }; - 2C41B8FF178BF3410065AB62 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CC2A48616A3D0020037CF76 /* Foundation.framework */; }; - 2C41B905178BF3410065AB62 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 2C41B903178BF3410065AB62 /* InfoPlist.strings */; }; - 2C41B908178BF3410065AB62 /* PomoTimerUnitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C41B907178BF3410065AB62 /* PomoTimerUnitTest.m */; }; - 2C41B90F178BF3AA0065AB62 /* LSPomoTaskTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C41B90E178BF3AA0065AB62 /* LSPomoTaskTest.m */; }; - 2C41B912178BF3E20065AB62 /* LSPomoCycleTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C41B911178BF3E20065AB62 /* LSPomoCycleTest.m */; }; 2CC2A48516A3D0020037CF76 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CC2A48416A3D0010037CF76 /* UIKit.framework */; }; 2CC2A48716A3D0020037CF76 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CC2A48616A3D0020037CF76 /* Foundation.framework */; }; 2CC2A48916A3D0020037CF76 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CC2A48816A3D0020037CF76 /* CoreGraphics.framework */; }; @@ -28,67 +21,15 @@ 2CCD5837170D451600FBB699 /* LSPomoTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CCD5830170D451500FBB699 /* LSPomoTask.m */; }; 2CCD5838170D451600FBB699 /* LSPomoCycle.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CCD5832170D451500FBB699 /* LSPomoCycle.m */; }; 2CCD5839170D451600FBB699 /* LSTaskViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CCD5834170D451500FBB699 /* LSTaskViewController.m */; }; + 2CCD583A170D451600FBB699 /* LSTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CCD5836170D451500FBB699 /* LSTableViewController.m */; }; + 2CCD5840170D453B00FBB699 /* naviBar.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD583B170D453A00FBB699 /* naviBar.png */; }; 2CCD5841170D453B00FBB699 /* Pomodoro_Dimmed.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD583C170D453A00FBB699 /* Pomodoro_Dimmed.png */; }; 2CCD5842170D453B00FBB699 /* Pomodoro_Off.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD583D170D453A00FBB699 /* Pomodoro_Off.png */; }; 2CCD5843170D453B00FBB699 /* Pomodoro_On.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD583E170D453A00FBB699 /* Pomodoro_On.png */; }; - 2CCD5848170D533800FBB699 /* LSPomoFunction.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CCD5847170D533800FBB699 /* LSPomoFunction.m */; }; - 2CCD584E170D53A100FBB699 /* LSHistoryListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CCD584C170D53A100FBB699 /* LSHistoryListViewController.m */; }; - 2CCD5851170D543600FBB699 /* LSNumberPushingView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CCD5850170D543600FBB699 /* LSNumberPushingView.m */; }; - 2CCD5854170D544300FBB699 /* UIViewController+Storyboard.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CCD5853170D544300FBB699 /* UIViewController+Storyboard.m */; }; - 2CCD5867170D54D600FBB699 /* cycle_0.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD585D170D54D500FBB699 /* cycle_0.png */; }; - 2CCD5868170D54D600FBB699 /* cycle_1.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD585E170D54D500FBB699 /* cycle_1.png */; }; - 2CCD5869170D54D600FBB699 /* cycle_2.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD585F170D54D500FBB699 /* cycle_2.png */; }; - 2CCD586A170D54D600FBB699 /* cycle_3.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD5860170D54D500FBB699 /* cycle_3.png */; }; - 2CCD586B170D54D600FBB699 /* cycle_4.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD5861170D54D500FBB699 /* cycle_4.png */; }; - 2CCD586C170D54D600FBB699 /* cycle_5.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD5862170D54D500FBB699 /* cycle_5.png */; }; - 2CCD586D170D54D600FBB699 /* cycle_6.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD5863170D54D500FBB699 /* cycle_6.png */; }; - 2CCD586E170D54D600FBB699 /* cycle_7.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD5864170D54D500FBB699 /* cycle_7.png */; }; - 2CCD586F170D54D600FBB699 /* cycle_8.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD5865170D54D600FBB699 /* cycle_8.png */; }; - 2CCD5870170D54D600FBB699 /* cycle_9.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD5866170D54D600FBB699 /* cycle_9.png */; }; - 2CCD587C170D54E600FBB699 /* num_0.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD5871170D54E500FBB699 /* num_0.png */; }; - 2CCD587D170D54E600FBB699 /* num_1.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD5872170D54E500FBB699 /* num_1.png */; }; - 2CCD587E170D54E600FBB699 /* num_2.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD5873170D54E500FBB699 /* num_2.png */; }; - 2CCD587F170D54E600FBB699 /* num_3.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD5874170D54E500FBB699 /* num_3.png */; }; - 2CCD5880170D54E600FBB699 /* num_4.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD5875170D54E500FBB699 /* num_4.png */; }; - 2CCD5881170D54E600FBB699 /* num_5.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD5876170D54E600FBB699 /* num_5.png */; }; - 2CCD5882170D54E600FBB699 /* num_6.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD5877170D54E600FBB699 /* num_6.png */; }; - 2CCD5883170D54E600FBB699 /* num_7.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD5878170D54E600FBB699 /* num_7.png */; }; - 2CCD5884170D54E600FBB699 /* num_8.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD5879170D54E600FBB699 /* num_8.png */; }; - 2CCD5885170D54E600FBB699 /* num_9.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD587A170D54E600FBB699 /* num_9.png */; }; - 2CCD5886170D54E600FBB699 /* num_shadow.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD587B170D54E600FBB699 /* num_shadow.png */; }; - 2CCD5888170D57E600FBB699 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CCD5887170D57E600FBB699 /* QuartzCore.framework */; }; - 2CCD588C170DAF3C00FBB699 /* RecordView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD588B170DAF3C00FBB699 /* RecordView.xib */; }; - 2CCD5898170DB02C00FBB699 /* button_reset_enable@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD588D170DB02A00FBB699 /* button_reset_enable@2x.png */; }; - 2CCD5899170DB02C00FBB699 /* panel_default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD588E170DB02B00FBB699 /* panel_default@2x.png */; }; - 2CCD589A170DB02C00FBB699 /* panel_pomo_pause@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD588F170DB02B00FBB699 /* panel_pomo_pause@2x.png */; }; - 2CCD589B170DB02C00FBB699 /* panel_recess@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD5890170DB02B00FBB699 /* panel_recess@2x.png */; }; - 2CCD589C170DB02C00FBB699 /* point_black@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD5891170DB02B00FBB699 /* point_black@2x.png */; }; - 2CCD589D170DB02C00FBB699 /* point_red@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD5892170DB02B00FBB699 /* point_red@2x.png */; }; - 2CCD589E170DB02C00FBB699 /* button_history@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD5893170DB02C00FBB699 /* button_history@2x.png */; }; - 2CCD589F170DB02C00FBB699 /* button_reset@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD5894170DB02C00FBB699 /* button_reset@2x.png */; }; - 2CCD58A0170DB02C00FBB699 /* button_todo@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD5895170DB02C00FBB699 /* button_todo@2x.png */; }; - 2CCD58A1170DB02C00FBB699 /* status_pause@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD5896170DB02C00FBB699 /* status_pause@2x.png */; }; - 2CCD58A2170DB02C00FBB699 /* status_play@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD5897170DB02C00FBB699 /* status_play@2x.png */; }; - 2CCD58A5170DBDBC00FBB699 /* LSTimerButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CCD58A4170DBDBC00FBB699 /* LSTimerButton.m */; }; - 2CCD58A917103E9A00FBB699 /* UIImage+ColorAtPixel.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CCD58A7170DBF2200FBB699 /* UIImage+ColorAtPixel.m */; }; - 2CCD58AA17104A2100FBB699 /* LSHistoryDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CCD584A170D53A000FBB699 /* LSHistoryDetailViewController.m */; }; - 2CCD58AD17105F2500FBB699 /* LSToDoTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CCD58AC17105F2200FBB699 /* LSToDoTableViewController.m */; }; - C1E2D73117714D5200B47111 /* icon_57_57.png in Resources */ = {isa = PBXBuildFile; fileRef = C1E2D73017714D5200B47111 /* icon_57_57.png */; }; - C1E2D73317714D6400B47111 /* icon_114_114.png in Resources */ = {isa = PBXBuildFile; fileRef = C1E2D73217714D6400B47111 /* icon_114_114.png */; }; + 2CCD5844170D453B00FBB699 /* btn@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CCD583F170D453A00FBB699 /* btn@2x.png */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 2C41B8FB178BF3410065AB62 /* PomoTimerUnitTest.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PomoTimerUnitTest.octest; sourceTree = BUILT_PRODUCTS_DIR; }; - 2C41B8FC178BF3410065AB62 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; }; - 2C41B902178BF3410065AB62 /* PomoTimerUnitTest-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "PomoTimerUnitTest-Info.plist"; sourceTree = ""; }; - 2C41B904178BF3410065AB62 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 2C41B906178BF3410065AB62 /* PomoTimerUnitTest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PomoTimerUnitTest.h; sourceTree = ""; }; - 2C41B907178BF3410065AB62 /* PomoTimerUnitTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PomoTimerUnitTest.m; sourceTree = ""; }; - 2C41B909178BF3410065AB62 /* PomoTimerUnitTest-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PomoTimerUnitTest-Prefix.pch"; sourceTree = ""; }; - 2C41B90D178BF3AA0065AB62 /* LSPomoTaskTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LSPomoTaskTest.h; sourceTree = ""; }; - 2C41B90E178BF3AA0065AB62 /* LSPomoTaskTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LSPomoTaskTest.m; sourceTree = ""; }; - 2C41B910178BF3E20065AB62 /* LSPomoCycleTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LSPomoCycleTest.h; sourceTree = ""; }; - 2C41B911178BF3E20065AB62 /* LSPomoCycleTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LSPomoCycleTest.m; sourceTree = ""; }; 2CC2A48016A3D0010037CF76 /* PomoTimer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PomoTimer.app; sourceTree = BUILT_PRODUCTS_DIR; }; 2CC2A48416A3D0010037CF76 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 2CC2A48616A3D0020037CF76 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; @@ -109,80 +50,21 @@ 2CCD5832170D451500FBB699 /* LSPomoCycle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LSPomoCycle.m; sourceTree = ""; }; 2CCD5833170D451500FBB699 /* LSTaskViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LSTaskViewController.h; sourceTree = ""; }; 2CCD5834170D451500FBB699 /* LSTaskViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LSTaskViewController.m; sourceTree = ""; }; + 2CCD5835170D451500FBB699 /* LSTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LSTableViewController.h; sourceTree = ""; }; + 2CCD5836170D451500FBB699 /* LSTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LSTableViewController.m; sourceTree = ""; }; + 2CCD583B170D453A00FBB699 /* naviBar.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = naviBar.png; sourceTree = ""; }; 2CCD583C170D453A00FBB699 /* Pomodoro_Dimmed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Pomodoro_Dimmed.png; sourceTree = ""; }; 2CCD583D170D453A00FBB699 /* Pomodoro_Off.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Pomodoro_Off.png; sourceTree = ""; }; 2CCD583E170D453A00FBB699 /* Pomodoro_On.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Pomodoro_On.png; sourceTree = ""; }; + 2CCD583F170D453A00FBB699 /* btn@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "btn@2x.png"; sourceTree = ""; }; 2CCD5845170D45BC00FBB699 /* LSPomoTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LSPomoTask.h; sourceTree = ""; }; - 2CCD5846170D533800FBB699 /* LSPomoFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LSPomoFunction.h; sourceTree = ""; }; - 2CCD5847170D533800FBB699 /* LSPomoFunction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LSPomoFunction.m; sourceTree = ""; }; - 2CCD5849170D53A000FBB699 /* LSHistoryDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LSHistoryDetailViewController.h; sourceTree = ""; }; - 2CCD584A170D53A000FBB699 /* LSHistoryDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LSHistoryDetailViewController.m; sourceTree = ""; }; - 2CCD584B170D53A000FBB699 /* LSHistoryListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LSHistoryListViewController.h; sourceTree = ""; }; - 2CCD584C170D53A100FBB699 /* LSHistoryListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LSHistoryListViewController.m; sourceTree = ""; }; - 2CCD584F170D543600FBB699 /* LSNumberPushingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LSNumberPushingView.h; sourceTree = ""; }; - 2CCD5850170D543600FBB699 /* LSNumberPushingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LSNumberPushingView.m; sourceTree = ""; }; - 2CCD5852170D544300FBB699 /* UIViewController+Storyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+Storyboard.h"; sourceTree = ""; }; - 2CCD5853170D544300FBB699 /* UIViewController+Storyboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+Storyboard.m"; sourceTree = ""; }; - 2CCD585D170D54D500FBB699 /* cycle_0.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cycle_0.png; sourceTree = ""; }; - 2CCD585E170D54D500FBB699 /* cycle_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cycle_1.png; sourceTree = ""; }; - 2CCD585F170D54D500FBB699 /* cycle_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cycle_2.png; sourceTree = ""; }; - 2CCD5860170D54D500FBB699 /* cycle_3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cycle_3.png; sourceTree = ""; }; - 2CCD5861170D54D500FBB699 /* cycle_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cycle_4.png; sourceTree = ""; }; - 2CCD5862170D54D500FBB699 /* cycle_5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cycle_5.png; sourceTree = ""; }; - 2CCD5863170D54D500FBB699 /* cycle_6.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cycle_6.png; sourceTree = ""; }; - 2CCD5864170D54D500FBB699 /* cycle_7.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cycle_7.png; sourceTree = ""; }; - 2CCD5865170D54D600FBB699 /* cycle_8.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cycle_8.png; sourceTree = ""; }; - 2CCD5866170D54D600FBB699 /* cycle_9.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cycle_9.png; sourceTree = ""; }; - 2CCD5871170D54E500FBB699 /* num_0.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = num_0.png; sourceTree = ""; }; - 2CCD5872170D54E500FBB699 /* num_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = num_1.png; sourceTree = ""; }; - 2CCD5873170D54E500FBB699 /* num_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = num_2.png; sourceTree = ""; }; - 2CCD5874170D54E500FBB699 /* num_3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = num_3.png; sourceTree = ""; }; - 2CCD5875170D54E500FBB699 /* num_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = num_4.png; sourceTree = ""; }; - 2CCD5876170D54E600FBB699 /* num_5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = num_5.png; sourceTree = ""; }; - 2CCD5877170D54E600FBB699 /* num_6.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = num_6.png; sourceTree = ""; }; - 2CCD5878170D54E600FBB699 /* num_7.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = num_7.png; sourceTree = ""; }; - 2CCD5879170D54E600FBB699 /* num_8.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = num_8.png; sourceTree = ""; }; - 2CCD587A170D54E600FBB699 /* num_9.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = num_9.png; sourceTree = ""; }; - 2CCD587B170D54E600FBB699 /* num_shadow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = num_shadow.png; sourceTree = ""; }; - 2CCD5887170D57E600FBB699 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - 2CCD588B170DAF3C00FBB699 /* RecordView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RecordView.xib; sourceTree = ""; }; - 2CCD588D170DB02A00FBB699 /* button_reset_enable@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "button_reset_enable@2x.png"; sourceTree = ""; }; - 2CCD588E170DB02B00FBB699 /* panel_default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "panel_default@2x.png"; sourceTree = ""; }; - 2CCD588F170DB02B00FBB699 /* panel_pomo_pause@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "panel_pomo_pause@2x.png"; sourceTree = ""; }; - 2CCD5890170DB02B00FBB699 /* panel_recess@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "panel_recess@2x.png"; sourceTree = ""; }; - 2CCD5891170DB02B00FBB699 /* point_black@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "point_black@2x.png"; sourceTree = ""; }; - 2CCD5892170DB02B00FBB699 /* point_red@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "point_red@2x.png"; sourceTree = ""; }; - 2CCD5893170DB02C00FBB699 /* button_history@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "button_history@2x.png"; sourceTree = ""; }; - 2CCD5894170DB02C00FBB699 /* button_reset@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "button_reset@2x.png"; sourceTree = ""; }; - 2CCD5895170DB02C00FBB699 /* button_todo@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "button_todo@2x.png"; sourceTree = ""; }; - 2CCD5896170DB02C00FBB699 /* status_pause@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "status_pause@2x.png"; sourceTree = ""; }; - 2CCD5897170DB02C00FBB699 /* status_play@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "status_play@2x.png"; sourceTree = ""; }; - 2CCD58A3170DBDBC00FBB699 /* LSTimerButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LSTimerButton.h; sourceTree = ""; }; - 2CCD58A4170DBDBC00FBB699 /* LSTimerButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LSTimerButton.m; sourceTree = ""; }; - 2CCD58A6170DBF2200FBB699 /* UIImage+ColorAtPixel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+ColorAtPixel.h"; sourceTree = ""; }; - 2CCD58A7170DBF2200FBB699 /* UIImage+ColorAtPixel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+ColorAtPixel.m"; sourceTree = ""; }; - 2CCD58AB17105F2000FBB699 /* LSToDoTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LSToDoTableViewController.h; sourceTree = ""; }; - 2CCD58AC17105F2200FBB699 /* LSToDoTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LSToDoTableViewController.m; sourceTree = ""; }; - C1E2D73017714D5200B47111 /* icon_57_57.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = icon_57_57.png; path = ../icon_57_57.png; sourceTree = ""; }; - C1E2D73217714D6400B47111 /* icon_114_114.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = icon_114_114.png; path = ../icon_114_114.png; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 2C41B8F7178BF3410065AB62 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 2C41B8FD178BF3410065AB62 /* SenTestingKit.framework in Frameworks */, - 2C41B8FE178BF3410065AB62 /* UIKit.framework in Frameworks */, - 2C41B8FF178BF3410065AB62 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 2CC2A47D16A3D0010037CF76 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 2CCD5888170D57E600FBB699 /* QuartzCore.framework in Frameworks */, 2CCD582D170D3E5100FBB699 /* AudioToolbox.framework in Frameworks */, 2CC2A48516A3D0020037CF76 /* UIKit.framework in Frameworks */, 2CC2A48716A3D0020037CF76 /* Foundation.framework in Frameworks */, @@ -193,35 +75,10 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 2C41B900178BF3410065AB62 /* PomoTimerUnitTest */ = { - isa = PBXGroup; - children = ( - 2C41B906178BF3410065AB62 /* PomoTimerUnitTest.h */, - 2C41B907178BF3410065AB62 /* PomoTimerUnitTest.m */, - 2C41B90D178BF3AA0065AB62 /* LSPomoTaskTest.h */, - 2C41B90E178BF3AA0065AB62 /* LSPomoTaskTest.m */, - 2C41B910178BF3E20065AB62 /* LSPomoCycleTest.h */, - 2C41B911178BF3E20065AB62 /* LSPomoCycleTest.m */, - 2C41B901178BF3410065AB62 /* Supporting Files */, - ); - path = PomoTimerUnitTest; - sourceTree = ""; - }; - 2C41B901178BF3410065AB62 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 2C41B902178BF3410065AB62 /* PomoTimerUnitTest-Info.plist */, - 2C41B903178BF3410065AB62 /* InfoPlist.strings */, - 2C41B909178BF3410065AB62 /* PomoTimerUnitTest-Prefix.pch */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; 2CC2A47516A3D0010037CF76 = { isa = PBXGroup; children = ( 2CC2A48A16A3D0020037CF76 /* PomoTimer */, - 2C41B900178BF3410065AB62 /* PomoTimerUnitTest */, 2CC2A48316A3D0010037CF76 /* Frameworks */, 2CC2A48116A3D0010037CF76 /* Products */, ); @@ -231,7 +88,6 @@ isa = PBXGroup; children = ( 2CC2A48016A3D0010037CF76 /* PomoTimer.app */, - 2C41B8FB178BF3410065AB62 /* PomoTimerUnitTest.octest */, ); name = Products; sourceTree = ""; @@ -239,12 +95,10 @@ 2CC2A48316A3D0010037CF76 /* Frameworks */ = { isa = PBXGroup; children = ( - 2CCD5887170D57E600FBB699 /* QuartzCore.framework */, 2CCD582C170D3E5100FBB699 /* AudioToolbox.framework */, 2CC2A48416A3D0010037CF76 /* UIKit.framework */, 2CC2A48616A3D0020037CF76 /* Foundation.framework */, 2CC2A48816A3D0020037CF76 /* CoreGraphics.framework */, - 2C41B8FC178BF3410065AB62 /* SenTestingKit.framework */, ); name = Frameworks; sourceTree = ""; @@ -252,24 +106,17 @@ 2CC2A48A16A3D0020037CF76 /* PomoTimer */ = { isa = PBXGroup; children = ( - 2CCD588A170DAF1C00FBB699 /* View */, - 2CCD5889170DAF0A00FBB699 /* Model */, - 2CCD5846170D533800FBB699 /* LSPomoFunction.h */, - 2CCD5847170D533800FBB699 /* LSPomoFunction.m */, 2CCD582E170D44CE00FBB699 /* MainStoryboard.storyboard */, - 2CCD588B170DAF3C00FBB699 /* RecordView.xib */, 2CC2A49316A3D0020037CF76 /* LSAppDelegate.h */, 2CC2A49416A3D0020037CF76 /* LSAppDelegate.m */, + 2CCD5845170D45BC00FBB699 /* LSPomoTask.h */, + 2CCD5830170D451500FBB699 /* LSPomoTask.m */, + 2CCD5831170D451500FBB699 /* LSPomoCycle.h */, + 2CCD5832170D451500FBB699 /* LSPomoCycle.m */, 2CCD5833170D451500FBB699 /* LSTaskViewController.h */, 2CCD5834170D451500FBB699 /* LSTaskViewController.m */, - 2CCD5849170D53A000FBB699 /* LSHistoryDetailViewController.h */, - 2CCD584A170D53A000FBB699 /* LSHistoryDetailViewController.m */, - 2CCD584B170D53A000FBB699 /* LSHistoryListViewController.h */, - 2CCD584C170D53A100FBB699 /* LSHistoryListViewController.m */, - 2CCD58AB17105F2000FBB699 /* LSToDoTableViewController.h */, - 2CCD58AC17105F2200FBB699 /* LSToDoTableViewController.m */, - 2CCD5852170D544300FBB699 /* UIViewController+Storyboard.h */, - 2CCD5853170D544300FBB699 /* UIViewController+Storyboard.m */, + 2CCD5835170D451500FBB699 /* LSTableViewController.h */, + 2CCD5836170D451500FBB699 /* LSTableViewController.m */, 2CC2A48B16A3D0020037CF76 /* Supporting Files */, ); path = PomoTimer; @@ -278,43 +125,11 @@ 2CC2A48B16A3D0020037CF76 /* Supporting Files */ = { isa = PBXGroup; children = ( - C1E2D73217714D6400B47111 /* icon_114_114.png */, - C1E2D73017714D5200B47111 /* icon_57_57.png */, - 2CCD588D170DB02A00FBB699 /* button_reset_enable@2x.png */, - 2CCD588E170DB02B00FBB699 /* panel_default@2x.png */, - 2CCD588F170DB02B00FBB699 /* panel_pomo_pause@2x.png */, - 2CCD5890170DB02B00FBB699 /* panel_recess@2x.png */, - 2CCD5891170DB02B00FBB699 /* point_black@2x.png */, - 2CCD5892170DB02B00FBB699 /* point_red@2x.png */, - 2CCD5893170DB02C00FBB699 /* button_history@2x.png */, - 2CCD5894170DB02C00FBB699 /* button_reset@2x.png */, - 2CCD5895170DB02C00FBB699 /* button_todo@2x.png */, - 2CCD5896170DB02C00FBB699 /* status_pause@2x.png */, - 2CCD5897170DB02C00FBB699 /* status_play@2x.png */, - 2CCD585D170D54D500FBB699 /* cycle_0.png */, - 2CCD585E170D54D500FBB699 /* cycle_1.png */, - 2CCD585F170D54D500FBB699 /* cycle_2.png */, - 2CCD5860170D54D500FBB699 /* cycle_3.png */, - 2CCD5861170D54D500FBB699 /* cycle_4.png */, - 2CCD5862170D54D500FBB699 /* cycle_5.png */, - 2CCD5863170D54D500FBB699 /* cycle_6.png */, - 2CCD5864170D54D500FBB699 /* cycle_7.png */, - 2CCD5865170D54D600FBB699 /* cycle_8.png */, - 2CCD5866170D54D600FBB699 /* cycle_9.png */, - 2CCD5871170D54E500FBB699 /* num_0.png */, - 2CCD5872170D54E500FBB699 /* num_1.png */, - 2CCD5873170D54E500FBB699 /* num_2.png */, - 2CCD5874170D54E500FBB699 /* num_3.png */, - 2CCD5875170D54E500FBB699 /* num_4.png */, - 2CCD5876170D54E600FBB699 /* num_5.png */, - 2CCD5877170D54E600FBB699 /* num_6.png */, - 2CCD5878170D54E600FBB699 /* num_7.png */, - 2CCD5879170D54E600FBB699 /* num_8.png */, - 2CCD587A170D54E600FBB699 /* num_9.png */, - 2CCD587B170D54E600FBB699 /* num_shadow.png */, + 2CCD583B170D453A00FBB699 /* naviBar.png */, 2CCD583C170D453A00FBB699 /* Pomodoro_Dimmed.png */, 2CCD583D170D453A00FBB699 /* Pomodoro_Off.png */, 2CCD583E170D453A00FBB699 /* Pomodoro_On.png */, + 2CCD583F170D453A00FBB699 /* btn@2x.png */, 2CC2A48C16A3D0020037CF76 /* PomoTimer-Info.plist */, 2CC2A48D16A3D0020037CF76 /* InfoPlist.strings */, 2CC2A49016A3D0020037CF76 /* main.m */, @@ -326,51 +141,9 @@ name = "Supporting Files"; sourceTree = ""; }; - 2CCD5889170DAF0A00FBB699 /* Model */ = { - isa = PBXGroup; - children = ( - 2CCD5845170D45BC00FBB699 /* LSPomoTask.h */, - 2CCD5830170D451500FBB699 /* LSPomoTask.m */, - 2CCD5831170D451500FBB699 /* LSPomoCycle.h */, - 2CCD5832170D451500FBB699 /* LSPomoCycle.m */, - ); - name = Model; - sourceTree = ""; - }; - 2CCD588A170DAF1C00FBB699 /* View */ = { - isa = PBXGroup; - children = ( - 2CCD58A6170DBF2200FBB699 /* UIImage+ColorAtPixel.h */, - 2CCD58A7170DBF2200FBB699 /* UIImage+ColorAtPixel.m */, - 2CCD584F170D543600FBB699 /* LSNumberPushingView.h */, - 2CCD5850170D543600FBB699 /* LSNumberPushingView.m */, - 2CCD58A3170DBDBC00FBB699 /* LSTimerButton.h */, - 2CCD58A4170DBDBC00FBB699 /* LSTimerButton.m */, - ); - name = View; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 2C41B8FA178BF3410065AB62 /* PomoTimerUnitTest */ = { - isa = PBXNativeTarget; - buildConfigurationList = 2C41B90C178BF3410065AB62 /* Build configuration list for PBXNativeTarget "PomoTimerUnitTest" */; - buildPhases = ( - 2C41B8F6178BF3410065AB62 /* Sources */, - 2C41B8F7178BF3410065AB62 /* Frameworks */, - 2C41B8F8178BF3410065AB62 /* Resources */, - 2C41B8F9178BF3410065AB62 /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PomoTimerUnitTest; - productName = PomoTimerUnitTest; - productReference = 2C41B8FB178BF3410065AB62 /* PomoTimerUnitTest.octest */; - productType = "com.apple.product-type.bundle"; - }; 2CC2A47F16A3D0010037CF76 /* PomoTimer */ = { isa = PBXNativeTarget; buildConfigurationList = 2CC2A4A416A3D0020037CF76 /* Build configuration list for PBXNativeTarget "PomoTimer" */; @@ -411,20 +184,11 @@ projectRoot = ""; targets = ( 2CC2A47F16A3D0010037CF76 /* PomoTimer */, - 2C41B8FA178BF3410065AB62 /* PomoTimerUnitTest */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 2C41B8F8178BF3410065AB62 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2C41B905178BF3410065AB62 /* InfoPlist.strings in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 2CC2A47E16A3D0010037CF76 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -434,76 +198,17 @@ 2CC2A49916A3D0020037CF76 /* Default@2x.png in Resources */, 2CC2A49B16A3D0020037CF76 /* Default-568h@2x.png in Resources */, 2CCD582F170D44CE00FBB699 /* MainStoryboard.storyboard in Resources */, + 2CCD5840170D453B00FBB699 /* naviBar.png in Resources */, 2CCD5841170D453B00FBB699 /* Pomodoro_Dimmed.png in Resources */, 2CCD5842170D453B00FBB699 /* Pomodoro_Off.png in Resources */, 2CCD5843170D453B00FBB699 /* Pomodoro_On.png in Resources */, - 2CCD5867170D54D600FBB699 /* cycle_0.png in Resources */, - 2CCD5868170D54D600FBB699 /* cycle_1.png in Resources */, - 2CCD5869170D54D600FBB699 /* cycle_2.png in Resources */, - 2CCD586A170D54D600FBB699 /* cycle_3.png in Resources */, - 2CCD586B170D54D600FBB699 /* cycle_4.png in Resources */, - 2CCD586C170D54D600FBB699 /* cycle_5.png in Resources */, - 2CCD586D170D54D600FBB699 /* cycle_6.png in Resources */, - 2CCD586E170D54D600FBB699 /* cycle_7.png in Resources */, - 2CCD586F170D54D600FBB699 /* cycle_8.png in Resources */, - 2CCD5870170D54D600FBB699 /* cycle_9.png in Resources */, - 2CCD587C170D54E600FBB699 /* num_0.png in Resources */, - 2CCD587D170D54E600FBB699 /* num_1.png in Resources */, - 2CCD587E170D54E600FBB699 /* num_2.png in Resources */, - 2CCD587F170D54E600FBB699 /* num_3.png in Resources */, - 2CCD5880170D54E600FBB699 /* num_4.png in Resources */, - 2CCD5881170D54E600FBB699 /* num_5.png in Resources */, - 2CCD5882170D54E600FBB699 /* num_6.png in Resources */, - 2CCD5883170D54E600FBB699 /* num_7.png in Resources */, - 2CCD5884170D54E600FBB699 /* num_8.png in Resources */, - 2CCD5885170D54E600FBB699 /* num_9.png in Resources */, - 2CCD5886170D54E600FBB699 /* num_shadow.png in Resources */, - 2CCD588C170DAF3C00FBB699 /* RecordView.xib in Resources */, - 2CCD5898170DB02C00FBB699 /* button_reset_enable@2x.png in Resources */, - 2CCD5899170DB02C00FBB699 /* panel_default@2x.png in Resources */, - 2CCD589A170DB02C00FBB699 /* panel_pomo_pause@2x.png in Resources */, - 2CCD589B170DB02C00FBB699 /* panel_recess@2x.png in Resources */, - 2CCD589C170DB02C00FBB699 /* point_black@2x.png in Resources */, - 2CCD589D170DB02C00FBB699 /* point_red@2x.png in Resources */, - 2CCD589E170DB02C00FBB699 /* button_history@2x.png in Resources */, - 2CCD589F170DB02C00FBB699 /* button_reset@2x.png in Resources */, - 2CCD58A0170DB02C00FBB699 /* button_todo@2x.png in Resources */, - 2CCD58A1170DB02C00FBB699 /* status_pause@2x.png in Resources */, - 2CCD58A2170DB02C00FBB699 /* status_play@2x.png in Resources */, - C1E2D73117714D5200B47111 /* icon_57_57.png in Resources */, - C1E2D73317714D6400B47111 /* icon_114_114.png in Resources */, + 2CCD5844170D453B00FBB699 /* btn@2x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - 2C41B8F9178BF3410065AB62 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ - 2C41B8F6178BF3410065AB62 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2C41B908178BF3410065AB62 /* PomoTimerUnitTest.m in Sources */, - 2C41B90F178BF3AA0065AB62 /* LSPomoTaskTest.m in Sources */, - 2C41B912178BF3E20065AB62 /* LSPomoCycleTest.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 2CC2A47C16A3D0010037CF76 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -513,28 +218,13 @@ 2CCD5837170D451600FBB699 /* LSPomoTask.m in Sources */, 2CCD5838170D451600FBB699 /* LSPomoCycle.m in Sources */, 2CCD5839170D451600FBB699 /* LSTaskViewController.m in Sources */, - 2CCD5848170D533800FBB699 /* LSPomoFunction.m in Sources */, - 2CCD584E170D53A100FBB699 /* LSHistoryListViewController.m in Sources */, - 2CCD5851170D543600FBB699 /* LSNumberPushingView.m in Sources */, - 2CCD5854170D544300FBB699 /* UIViewController+Storyboard.m in Sources */, - 2CCD58A5170DBDBC00FBB699 /* LSTimerButton.m in Sources */, - 2CCD58A917103E9A00FBB699 /* UIImage+ColorAtPixel.m in Sources */, - 2CCD58AA17104A2100FBB699 /* LSHistoryDetailViewController.m in Sources */, - 2CCD58AD17105F2500FBB699 /* LSToDoTableViewController.m in Sources */, + 2CCD583A170D451600FBB699 /* LSTableViewController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ - 2C41B903178BF3410065AB62 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 2C41B904178BF3410065AB62 /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; 2CC2A48D16A3D0020037CF76 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( @@ -546,44 +236,6 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ - 2C41B90A178BF3410065AB62 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - FRAMEWORK_SEARCH_PATHS = ( - "\"$(SDKROOT)/Developer/Library/Frameworks\"", - "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "PomoTimerUnitTest/PomoTimerUnitTest-Prefix.pch"; - INFOPLIST_FILE = "PomoTimerUnitTest/PomoTimerUnitTest-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 6.1; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = octest; - }; - name = Debug; - }; - 2C41B90B178BF3410065AB62 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - FRAMEWORK_SEARCH_PATHS = ( - "\"$(SDKROOT)/Developer/Library/Frameworks\"", - "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "PomoTimerUnitTest/PomoTimerUnitTest-Prefix.pch"; - INFOPLIST_FILE = "PomoTimerUnitTest/PomoTimerUnitTest-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 6.1; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = octest; - }; - name = Release; - }; 2CC2A4A216A3D0020037CF76 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -659,14 +311,6 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 2C41B90C178BF3410065AB62 /* Build configuration list for PBXNativeTarget "PomoTimerUnitTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2C41B90A178BF3410065AB62 /* Debug */, - 2C41B90B178BF3410065AB62 /* Release */, - ); - defaultConfigurationIsVisible = 0; - }; 2CC2A47A16A3D0010037CF76 /* Build configuration list for PBXProject "PomoTimer" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/PomoTimer.xcodeproj/project.xcworkspace/xcuserdata/lingostar.xcuserdatad/UserInterfaceState.xcuserstate b/PomoTimer.xcodeproj/project.xcworkspace/xcuserdata/lingostar.xcuserdatad/UserInterfaceState.xcuserstate index 53c63d3..69f3fd5 100644 Binary files a/PomoTimer.xcodeproj/project.xcworkspace/xcuserdata/lingostar.xcuserdatad/UserInterfaceState.xcuserstate and b/PomoTimer.xcodeproj/project.xcworkspace/xcuserdata/lingostar.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/PomoTimer.xcodeproj/project.xcworkspace/xcuserdata/wookchu.xcuserdatad/UserInterfaceState.xcuserstate b/PomoTimer.xcodeproj/project.xcworkspace/xcuserdata/wookchu.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index 97dd84e..0000000 Binary files a/PomoTimer.xcodeproj/project.xcworkspace/xcuserdata/wookchu.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/PomoTimer.xcodeproj/xcuserdata/lingostar.xcuserdatad/xcschemes/PomoTimer.xcscheme b/PomoTimer.xcodeproj/xcuserdata/lingostar.xcuserdatad/xcschemes/PomoTimer.xcscheme index d40d682..47cd9cd 100644 --- a/PomoTimer.xcodeproj/xcuserdata/lingostar.xcuserdatad/xcschemes/PomoTimer.xcscheme +++ b/PomoTimer.xcodeproj/xcuserdata/lingostar.xcuserdatad/xcschemes/PomoTimer.xcscheme @@ -1,6 +1,6 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/PomoTimer.xcodeproj/xcuserdata/lingostar.xcuserdatad/xcschemes/xcschememanagement.plist b/PomoTimer.xcodeproj/xcuserdata/lingostar.xcuserdatad/xcschemes/xcschememanagement.plist index 641678d..9904e56 100644 --- a/PomoTimer.xcodeproj/xcuserdata/lingostar.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/PomoTimer.xcodeproj/xcuserdata/lingostar.xcuserdatad/xcschemes/xcschememanagement.plist @@ -9,19 +9,9 @@ orderHint 0 - PomoTimerUnitTest.xcscheme - - orderHint - 1 - SuppressBuildableAutocreation - 2C41B8FA178BF3410065AB62 - - primary - - 2CC2A47F16A3D0010037CF76 primary diff --git a/PomoTimer.xcodeproj/xcuserdata/wookchu.xcuserdatad/xcschemes/PomoTimer.xcscheme b/PomoTimer.xcodeproj/xcuserdata/wookchu.xcuserdatad/xcschemes/PomoTimer.xcscheme deleted file mode 100644 index d40d682..0000000 --- a/PomoTimer.xcodeproj/xcuserdata/wookchu.xcuserdatad/xcschemes/PomoTimer.xcscheme +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/PomoTimer.xcodeproj/xcuserdata/wookchu.xcuserdatad/xcschemes/xcschememanagement.plist b/PomoTimer.xcodeproj/xcuserdata/wookchu.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index 9904e56..0000000 --- a/PomoTimer.xcodeproj/xcuserdata/wookchu.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - SchemeUserState - - PomoTimer.xcscheme - - orderHint - 0 - - - SuppressBuildableAutocreation - - 2CC2A47F16A3D0010037CF76 - - primary - - - - - diff --git a/PomoTimer/LSAppDelegate.h b/PomoTimer/LSAppDelegate.h index a7c01ab..d53f46e 100644 --- a/PomoTimer/LSAppDelegate.h +++ b/PomoTimer/LSAppDelegate.h @@ -12,10 +12,4 @@ @property (strong, nonatomic) UIWindow *window; -@property NSMutableArray *dailyPomodoroArray; -@property NSDictionary *todaysPomodoro; -@property (readonly) NSMutableArray *todaysPomoCycleArray; - -- (void)createNewPomoCycle; -- (void)changeTodaysPomoCycleArray:(NSArray *)newArray; @end diff --git a/PomoTimer/LSAppDelegate.m b/PomoTimer/LSAppDelegate.m index e0f1574..fc70113 100644 --- a/PomoTimer/LSAppDelegate.m +++ b/PomoTimer/LSAppDelegate.m @@ -7,40 +7,15 @@ // #import "LSAppDelegate.h" -#import "LSPomoCycle.h" -#import "LSPomoTask.h" -#import "LSTaskViewController.h" -static NSString *PomodoroFileName = @"Pomodoro.pmtmr"; -static NSString *kBackgroundDateKey = @"BackgroundDate"; -@interface LSAppDelegate (){ - NSDate *_backgroundDate; -} - -@end @implementation LSAppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - NSLog(@"%s", __FUNCTION__); + [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"naviBar.png"] forBarMetrics:UIBarMetricsDefault]; + [[UIBarButtonItem appearance] setTintColor:[UIColor colorWithWhite:0.3 alpha:0.8]]; // Override point for customization after application launch. - - NSString *filePath = [documentDirectory() stringByAppendingPathComponent:PomodoroFileName]; - - if ([[NSFileManager defaultManager] fileExistsAtPath:filePath]){ - NSArray *unarchArray = [NSKeyedUnarchiver unarchiveObjectWithFile:filePath]; - _dailyPomodoroArray = [[NSMutableArray alloc] initWithArray:unarchArray]; - } else { - _dailyPomodoroArray = [[NSMutableArray alloc] initWithCapacity:10]; - } - - [[UIApplication sharedApplication] cancelAllLocalNotifications]; - - NSDate *userDefaultBackgroundDate = [[NSUserDefaults standardUserDefaults] objectForKey:kBackgroundDateKey]; - if (isSameDay(userDefaultBackgroundDate, [NSDate date])){ - _backgroundDate = userDefaultBackgroundDate; - } return YES; } @@ -48,109 +23,27 @@ - (void)applicationWillResignActive:(UIApplication *)application { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. - _backgroundDate = [NSDate date]; - NSLog(@"%s \r\n date = %@", __FUNCTION__, _backgroundDate); } - (void)applicationDidEnterBackground:(UIApplication *)application { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. - _backgroundDate = [NSDate date]; - - NSString *filePath = [documentDirectory() stringByAppendingPathComponent:PomodoroFileName]; - - [NSKeyedArchiver archiveRootObject:_dailyPomodoroArray toFile:filePath]; - - NSLog(@"%s \r\n date = %@", __FUNCTION__, _backgroundDate); } - (void)applicationWillEnterForeground:(UIApplication *)application { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. - NSLog(@"%s \r\n date = %@", __FUNCTION__, _backgroundDate); - //앱을 껐다가 한 참 뒤에 다시 켜는 경우에 문제가 없을까? 즉, 날짜가 바뀌었을 때. - //그 경우 Local Notification이 해결해 주겠지? - - - - UINavigationController *mainNavigationController = (UINavigationController *)self.window.rootViewController; - LSTaskViewController *taskViewController = mainNavigationController.topViewController; - - LSPomoTask *currentTask = taskViewController.pomoCycle.currentTask; - if (currentTask.status == COUNTING){ - int timeGap = [[NSDate date] timeIntervalSinceDate:_backgroundDate]; - int currentTaskTime = currentTask.taskTimeInSecond; - int resultTime = currentTaskTime - timeGap; - currentTask.taskTimeInSecond = resultTime; - } } - (void)applicationDidBecomeActive:(UIApplication *)application { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - //NSLog(@"%s \r\n date = %@", __FUNCTION__, _backgroundDate); - [UIApplication sharedApplication].applicationIconBadgeNumber = 0; } - (void)applicationWillTerminate:(UIApplication *)application { - NSString *filePath = [documentDirectory() stringByAppendingPathComponent:PomodoroFileName]; - - [NSKeyedArchiver archiveRootObject:_dailyPomodoroArray toFile:filePath]; - - [[NSUserDefaults standardUserDefaults] setObject:_backgroundDate forKey:kBackgroundDateKey]; + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } -- (NSDictionary *)todaysPomodoro -{ - NSDictionary *lastDailyPomo = [_dailyPomodoroArray lastObject]; - if (lastDailyPomo != nil){ - NSDate *lastPomoDate = [lastDailyPomo valueForKey:@"PomodoroDate"]; - if (isSameDay(lastPomoDate, [NSDate date])) - return lastDailyPomo; - } - - lastDailyPomo = [NSDictionary dictionaryWithObjectsAndKeys:[NSDate date], kPomodoroDateKey, [NSArray array], kPomodoroCyclesKey, nil]; - [_dailyPomodoroArray addObject:lastDailyPomo]; - - return lastDailyPomo; -} - -- (void)setTodaysPomodoro:(NSDictionary *)todaysPomodoro -{ - NSDictionary *lastDailyPomo = [_dailyPomodoroArray lastObject]; - if (lastDailyPomo != nil){ - NSDate *lastPomoDate = [lastDailyPomo valueForKey:@"PomodoroDate"]; - if (isSameDay(lastPomoDate, [NSDate date])){ - [_dailyPomodoroArray removeLastObject]; - } - } - [_dailyPomodoroArray addObject:todaysPomodoro]; -} - -- (NSMutableArray *)todaysPomoCycleArray -{ - NSMutableArray *pomoCycle = [[NSMutableArray alloc] initWithArray:[self.todaysPomodoro valueForKey:kPomodoroCyclesKey]]; - return pomoCycle; -} - -- (void)createNewPomoCycle -{ - NSMutableArray *pomoCycles = [self todaysPomoCycleArray]; - - LSPomoCycle *newCycle = [[LSPomoCycle alloc] init]; - [pomoCycles addObject:newCycle]; - - NSMutableDictionary *newTodayDict = [NSMutableDictionary dictionaryWithDictionary:self.todaysPomodoro]; - [newTodayDict setValue:pomoCycles forKey:kPomodoroCyclesKey]; - self.todaysPomodoro = newTodayDict; -} - -- (void)changeTodaysPomoCycleArray:(NSArray *)newArray -{ - NSMutableDictionary *newTodayDict = [NSMutableDictionary dictionaryWithDictionary:self.todaysPomodoro]; - [newTodayDict setValue:newArray forKey:kPomodoroCyclesKey]; - self.todaysPomodoro = newTodayDict; -} @end diff --git a/PomoTimer/LSHistoryDetailViewController.h b/PomoTimer/LSHistoryDetailViewController.h deleted file mode 100644 index 33abe1e..0000000 --- a/PomoTimer/LSHistoryDetailViewController.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// LSHistoryDetailViewController.h -// PomoTimer -// -// Created by Lingostar on 13. 1. 7.. -// Copyright (c) 2013년 Lingostar. All rights reserved. -// - -#import - -@interface LSHistoryDetailViewController : UIViewController - -@property (weak, nonatomic) IBOutlet UIView *historyRecordView; -@property NSDictionary *pomodoroOfTheDay; -@end diff --git a/PomoTimer/LSHistoryDetailViewController.m b/PomoTimer/LSHistoryDetailViewController.m deleted file mode 100644 index 1d2e2bf..0000000 --- a/PomoTimer/LSHistoryDetailViewController.m +++ /dev/null @@ -1,137 +0,0 @@ -// -// LSHistoryDetailViewController.m -// PomoTimer -// -// Created by Lingostar on 13. 1. 7.. -// Copyright (c) 2013년 Lingostar. All rights reserved. -// - -#import "LSHistoryDetailViewController.h" -#import "LSNumberPushingView.h" -#import "LSPomoCycle.h" -#import "LSPomoTask.h" -#import "LSAppDelegate.h" - -@interface LSHistoryDetailViewController () -{ - LSNumberPushingView *_cycleView; -} -@end - -@implementation LSHistoryDetailViewController - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil -{ - self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; - if (self) { - // Custom initialization - } - return self; -} - -- (void)viewDidLoad -{ - [super viewDidLoad]; - - _cycleView = [[LSNumberPushingView alloc] initWithFrame:CGRectMake(40, 45, 38, 29) numType:CYCLE_NUM]; - [self.historyRecordView addSubview:_cycleView]; - _cycleView.targetPanelNum = [self cycleCountForComplete]; - - LSPomoCycle *lastCycle = [self lastCycleOfTheDay]; - for (int i = 0; i < [lastCycle.pomoArray count]; i++) { - LSPomoTask *task = [lastCycle.pomoArray objectAtIndex:i]; - UIImageView *pomodoroImageView = (UIImageView *)[self.historyRecordView viewWithTag:(500+i)]; - NSString *pomodoroImageName; - switch (task.status) { - case READY: case PAUSE: case COUNTING: - pomodoroImageName = @"Pomodoro_Off"; - break; - case DONE: - pomodoroImageName = @"Pomodoro_On"; - break; - } - pomodoroImageView.image = [UIImage imageNamed:pomodoroImageName]; - } -} - -- (void)didReceiveMemoryWarning -{ - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - --(LSAppDelegate *)appDelegate -{ - return [[UIApplication sharedApplication] delegate]; -} - -- (int)cycleCountForComplete -{ - NSArray *pomodoroCycleArray = [self.pomodoroOfTheDay valueForKey:@"PomodoroCycle"]; - int cycleCount = 0; - for (LSPomoCycle *pomoCycle in pomodoroCycleArray) { - if ([pomoCycle doneTaskCount] == 4) cycleCount ++; - } - return cycleCount; -} - -- (int)cycleCountForStart -{ - NSArray *pomodoroCycleArray = [self.pomodoroOfTheDay valueForKey:@"PomodoroCycle"]; - int cycleCount = 0; - for (LSPomoCycle *pomoCycle in pomodoroCycleArray) { - if ([pomoCycle startedTaskCount] > 0) cycleCount ++; - } - return cycleCount; -} - -- (LSPomoCycle *)lastCycleOfTheDay -{ - NSArray *pomodoroCycleArray = [self.pomodoroOfTheDay valueForKey:@"PomodoroCycle"]; - for (LSPomoCycle *pomoCycle in pomodoroCycleArray) { - if ([pomoCycle doneTaskCount] < 4) return pomoCycle; - } - return [pomodoroCycleArray lastObject]; -} - -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return [self cycleCountForStart]; -} - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - NSArray *pomodoroCyleArray = [self.pomodoroOfTheDay valueForKey:@"PomodoroCycle"]; - LSPomoCycle *pomoCycle = [pomodoroCyleArray objectAtIndex:section]; - int rowCount = [pomoCycle doneTaskCount]; - return rowCount; -} - -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - static NSString *CellIdentifier = @"DetailCell"; - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath]; - - - NSArray *pomodoroCyleArray = [self.pomodoroOfTheDay valueForKey:@"PomodoroCycle"]; - LSPomoCycle *pomoCycle = [pomodoroCyleArray objectAtIndex:indexPath.section]; - LSPomoTask *currentTask = [pomoCycle.pomoArray objectAtIndex:indexPath.row]; - - cell.textLabel.text = currentTask.taskName; - cell.detailTextLabel.text = [NSString stringWithFormat:@"%@",currentTask.periodString]; - - return cell; -} - -- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section -{ - UILabel *sectionLabel = [[UILabel alloc] init]; - sectionLabel.backgroundColor = [UIColor darkGrayColor]; - sectionLabel.textColor = [UIColor whiteColor]; - sectionLabel.font = [UIFont boldSystemFontOfSize:12]; - sectionLabel.text = [NSString stringWithFormat:@" Cycle %d",section+1]; - - return sectionLabel; -} - -@end diff --git a/PomoTimer/LSHistoryListViewController.h b/PomoTimer/LSHistoryListViewController.h deleted file mode 100644 index 308d1e8..0000000 --- a/PomoTimer/LSHistoryListViewController.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// LSHistoryListViewController.h -// PomoTimer -// -// Created by Lingostar on 13. 1. 6.. -// Copyright (c) 2013년 Lingostar. All rights reserved. -// - -#import - -@interface LSHistoryListViewController : UITableViewController - - -@end diff --git a/PomoTimer/LSNumberPushingView.h b/PomoTimer/LSNumberPushingView.h deleted file mode 100644 index db42964..0000000 --- a/PomoTimer/LSNumberPushingView.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// NumberPushingView.h -// PomoTimer -// -// Created by LingoStar on 13. 01. 02. -// Copyright 2013 Lingostar. All rights reserved. -// - -#import -#import - -@interface LSNumberPushingView : UIView - -@property int numType; -@property int targetPanelNum; -@property int maxNum; - -- (id)initWithFrame:(CGRect)frame numType:(int)numType; - -#define TIMER_NUM 0 -#define CYCLE_NUM 1 -@end - diff --git a/PomoTimer/LSNumberPushingView.m b/PomoTimer/LSNumberPushingView.m deleted file mode 100644 index 2049cf5..0000000 --- a/PomoTimer/LSNumberPushingView.m +++ /dev/null @@ -1,105 +0,0 @@ -// -// NumberPushingView.m -// PomoTimer -// -// Created by LingoStar on 13. 01. 02. -// Copyright 2013 Lingostar. All rights reserved. -// - -#import "LSNumberPushingView.h" - -@interface LSNumberPushingView() -{ - UIView *_panelNumContainerView; - UIImageView *_nextPanelImageView; -} - -- (void)pushPanelFrom:(int)fromValue to:(int)toValue; - -@end - -@implementation LSNumberPushingView - -- (id)initWithFrame:(CGRect)frame numType:(int)numType -{ - if (self = [super initWithFrame:frame]) { - - self.clipsToBounds = YES; - self.numType = numType; - - CGRect bounds = CGRectMake(0, 0, frame.size.width, frame.size.height); - _panelNumContainerView = [[UIView alloc] initWithFrame:bounds]; - [self addSubview:_panelNumContainerView]; - - _nextPanelImageView = [[UIImageView alloc] initWithFrame:bounds]; - [_panelNumContainerView addSubview:_nextPanelImageView]; - - - _targetPanelNum = -1; - _maxNum = 9; - [self addObserver:self forKeyPath:@"targetPanelNum" - options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld - context:nil]; - self.targetPanelNum = 0; - } - return self; -} - -- (id)initWithFrame:(CGRect)frame -{ - return [self initWithFrame:frame numType:TIMER_NUM]; -} - - -- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context -{ - int oldValue = [[change valueForKey:NSKeyValueChangeOldKey] intValue]; - int newValue = [[change valueForKey:NSKeyValueChangeNewKey] intValue]; - - - if (oldValue != newValue) { - [self pushPanelFrom:oldValue to:newValue]; - } -} - - -- (void)dealloc { - [self removeObserver:self forKeyPath:@"targetPanelNum"]; -} - - -- (void)pushPanelFrom:(int)fromValue to:(int)toValue -{ - CATransition *animation = [CATransition animation]; - animation.duration = 0.2; - animation.type = kCATransitionPush; - - if (fromValue == _maxNum && toValue ==0){ - animation.subtype = kCATransitionFromTop; - } else if (fromValue ==0 && toValue ==_maxNum){ - animation.subtype = kCATransitionFromBottom; - } else { - if (fromValue < toValue) - animation.subtype = kCATransitionFromTop; - else - animation.subtype = kCATransitionFromBottom; - } - [_nextPanelImageView removeFromSuperview]; - - NSString *imageName; - - if(self.numType == TIMER_NUM) - imageName = [NSString stringWithFormat:@"num_%d.png", toValue]; - else if(self.numType == CYCLE_NUM) - imageName = [NSString stringWithFormat:@"cycle_%d.png", toValue]; - - - UIImage *newImage = [UIImage imageNamed:imageName]; - _nextPanelImageView.image = newImage; - - [_panelNumContainerView addSubview:_nextPanelImageView]; - - [_panelNumContainerView.layer addAnimation:animation forKey:@"transitionViewAnimation"]; -} - -@end diff --git a/PomoTimer/LSPomoCycle.h b/PomoTimer/LSPomoCycle.h index 8b5feaa..d356418 100644 --- a/PomoTimer/LSPomoCycle.h +++ b/PomoTimer/LSPomoCycle.h @@ -11,17 +11,14 @@ @interface LSPomoCycle : NSObject -- (void)resetCurrentTask; -- (int)doneTaskCount; -- (int)startedTaskCount; - -- (BOOL)isTaskDone:(int)index; -- (BOOL)isTaskStarted:(int)index; -- (void)changeTaskName:(NSString *)newName atTaskIndex:(int)index; - -@property NSArray *pomoArray; -@property NSArray *recessArray; +- (id)initWithType:(int)typeOfCycle; +@property NSArray *taskArray; @property LSPomoTask *currentTask; +@property int typeOfCycle; +//0 25Pomodoro & 5Recess +//1 25P & 5R & 25P & 5R +//2 25P & 5R & 25P & 5R & 25P & 5R +//3 25P & 5R & 25P & 5R & 25P & 5R & 25P & 30I @end diff --git a/PomoTimer/LSPomoCycle.m b/PomoTimer/LSPomoCycle.m index 55ae171..7260450 100644 --- a/PomoTimer/LSPomoCycle.m +++ b/PomoTimer/LSPomoCycle.m @@ -8,93 +8,74 @@ #import "LSPomoCycle.h" +#define POMODORO_TIME 25*60 +#define RECESS_TIME 5*60 +#define INTERMISSION_TIME 30*60 @implementation LSPomoCycle -- (id)init; + +- (id)initWithType:(int)typeOfCycle; { self = [super init]; if (self != nil){ - NSString *pomoTaskName = @"Work!"; - NSString *recessTaskName = @"Take a break.."; NSMutableArray *pomoCycle = [[NSMutableArray alloc] initWithCapacity:10]; - NSMutableArray *recessCycle = [[NSMutableArray alloc] initWithCapacity:10]; LSPomoTask *firstPomo = [[LSPomoTask alloc] init]; - firstPomo.taskTimeInSecond = POMODORO_TIME-1; + firstPomo.taskTimeInSecond = POMODORO_TIME; firstPomo.typeOfTask = POMODORO; - firstPomo.taskName = pomoTaskName; [pomoCycle addObject:firstPomo]; LSPomoTask *firstRecess = [[LSPomoTask alloc] init]; - firstRecess.taskTimeInSecond = RECESS_TIME-1; + firstRecess.taskTimeInSecond = RECESS_TIME; firstRecess.typeOfTask = RECESS; - firstRecess.taskName = recessTaskName; - [recessCycle addObject:firstRecess]; - - LSPomoTask *secondPomo = [[LSPomoTask alloc] init]; - secondPomo.taskTimeInSecond = POMODORO_TIME-1; - secondPomo.typeOfTask = POMODORO; - secondPomo.taskName = pomoTaskName; - [pomoCycle addObject:secondPomo]; - - LSPomoTask *secondRecess = [[LSPomoTask alloc] init]; - secondRecess.taskTimeInSecond = RECESS_TIME-1; - secondRecess.typeOfTask = RECESS; - secondRecess.taskName = recessTaskName; - [recessCycle addObject:secondRecess]; - - LSPomoTask *thirdPomo = [[LSPomoTask alloc] init]; - thirdPomo.taskTimeInSecond = POMODORO_TIME-1; - thirdPomo.typeOfTask = POMODORO; - thirdPomo.taskName = pomoTaskName; - [pomoCycle addObject:thirdPomo]; - - LSPomoTask *thirdRecess = [[LSPomoTask alloc] init]; - thirdRecess.taskTimeInSecond = RECESS_TIME-1; - thirdRecess.typeOfTask = RECESS; - thirdRecess.taskName = recessTaskName; - [recessCycle addObject:thirdRecess]; - - LSPomoTask *fourthPomo = [[LSPomoTask alloc] init]; - fourthPomo.taskTimeInSecond = POMODORO_TIME-1; - fourthPomo.typeOfTask = POMODORO; - fourthPomo.taskName = pomoTaskName; - [pomoCycle addObject:fourthPomo]; + [pomoCycle addObject:firstRecess]; - LSPomoTask *intermission = [[LSPomoTask alloc] init]; - intermission.taskTimeInSecond = RECESS_TIME-1; - intermission.typeOfTask = RECESS; - intermission.taskName = @"- - intermission - -"; - [recessCycle addObject:intermission]; + if (typeOfCycle > 0) { + LSPomoTask *secondPomo = [[LSPomoTask alloc] init]; + secondPomo.taskTimeInSecond = POMODORO_TIME; + secondPomo.typeOfTask = POMODORO; + [pomoCycle addObject:secondPomo]; + + LSPomoTask *secondRecess = [[LSPomoTask alloc] init]; + secondRecess.taskTimeInSecond = RECESS_TIME; + secondRecess.typeOfTask = RECESS; + [pomoCycle addObject:secondRecess]; + } + if (typeOfCycle > 1) { + LSPomoTask *thirdPomo = [[LSPomoTask alloc] init]; + thirdPomo.taskTimeInSecond = POMODORO_TIME; + thirdPomo.typeOfTask = POMODORO; + [pomoCycle addObject:thirdPomo]; + + LSPomoTask *thirdRecess = [[LSPomoTask alloc] init]; + thirdRecess.taskTimeInSecond = RECESS_TIME; + thirdRecess.typeOfTask = RECESS; + [pomoCycle addObject:thirdRecess]; + } + if (typeOfCycle > 2) { + LSPomoTask *fourthPomo = [[LSPomoTask alloc] init]; + fourthPomo.taskTimeInSecond = POMODORO_TIME; + fourthPomo.typeOfTask = POMODORO; + [pomoCycle addObject:fourthPomo]; + + LSPomoTask *intermission = [[LSPomoTask alloc] init]; + intermission.taskTimeInSecond = INTERMISSION_TIME; + intermission.typeOfTask = RECESS; + [pomoCycle addObject:intermission]; + } - self.pomoArray = (NSArray *)pomoCycle; - self.recessArray = (NSArray *)recessCycle; + self.taskArray = (NSArray *)pomoCycle; - } - return self; -} - -- (void)dealloc -{ - self.currentTask = nil; - self.pomoArray = nil; - self.recessArray = nil; -} + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(startNextTask:) name:kPomodoroTaskDone object:nil]; -- (id) initWithCoder:(NSCoder *)aDecoder -{ - self = [super init]; - if (self != nil){ - self.pomoArray = [aDecoder decodeObjectForKey:@"PomoArray"]; - self.recessArray = [aDecoder decodeObjectForKey:@"RecessArray"]; } - return self; } -- (void)encodeWithCoder:(NSCoder *)aCoder +- (void)dealloc { - [aCoder encodeObject:self.pomoArray forKey:@"PomoArray"]; - [aCoder encodeObject:self.recessArray forKey:@"RecessArray"]; + [_currentTask stopTask]; + _taskArray = nil; + [[NSNotificationCenter defaultCenter] removeObserver:self name:kPomodoroTaskDone object:nil]; } - (LSPomoTask *)currentTask @@ -102,86 +83,22 @@ - (LSPomoTask *)currentTask if (_currentTask != nil && _currentTask.status < DONE){ return _currentTask; } else { - for (int i=0; i < [self.recessArray count]; i++) { - LSPomoTask *pomoTask = [self.pomoArray objectAtIndex:i]; - LSPomoTask *recessTask = [self.recessArray objectAtIndex:i]; - if (pomoTask.status < DONE) { - _currentTask = pomoTask; - return _currentTask; - } else if (pomoTask.status == DONE && recessTask.status < DONE) - { - _currentTask = recessTask; + for (LSPomoTask *task in self.taskArray) { + if (task.status < DONE){ + _currentTask = task; return _currentTask; } } } - return nil; } - -- (void)resetCurrentTask +- (void)startNextTask:(NSNotification *)notification { LSPomoTask *currentTask = self.currentTask; - if (currentTask.typeOfTask == POMODORO){ - [currentTask resetTask]; - currentTask.taskTimeInSecond = POMODORO_TIME; - } -} - - -- (int)doneTaskCount -{ - int count = 0; - for (LSPomoTask *pomoTask in _pomoArray) { - if (pomoTask.status == DONE) count++; + if (currentTask != nil && currentTask.status == READY){ + currentTask.status = COUNTING; } - - return count; -} - -- (int)startedTaskCount -{ - int count = 0; - for (LSPomoTask *pomoTask in _pomoArray) { - if (pomoTask.startDate != nil) count++; - } - - return count; -} - -- (BOOL)isTaskDone:(int)index -{ - LSPomoTask *currentTask = [self.pomoArray objectAtIndex:index]; - - if (currentTask.status == DONE) { - return YES; - } - - return NO; -} - -- (BOOL)isTaskStarted:(int)index -{ - LSPomoTask *currentTask = [self.pomoArray objectAtIndex:index]; - - if (currentTask.status > READY) { - return YES; - } - - return NO; -} - -- (void)changeTaskName:(NSString *)newName atTaskIndex:(int)index -{ - NSMutableArray *newTaskArray = [NSMutableArray arrayWithArray:self.pomoArray]; - LSPomoTask *currentTask = [newTaskArray objectAtIndex:index]; - - [currentTask setTaskName:newName]; - [newTaskArray replaceObjectAtIndex:index withObject:currentTask]; - - self.pomoArray = (NSArray *)newTaskArray; - } @end diff --git a/PomoTimer/LSPomoFunction.h b/PomoTimer/LSPomoFunction.h deleted file mode 100644 index 693efc6..0000000 --- a/PomoTimer/LSPomoFunction.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// LSPomoFunction.h -// PomoTimer -// -// Created by Lingostar on 13. 1. 9.. -// Copyright (c) 2013년 Lingostar. All rights reserved. -// - -#import - -#define POMODORO_TIME 25*60 -#define RECESS_TIME 5*60 -#define INTERMISSION_TIME 30*60 - -//Keys -static NSString *kPomodoroDateKey = @"PomodoroDate"; -static NSString *kPomodoroCyclesKey = @"PomodoroCycle"; - -//Notifications -static NSString *kPomodoroTaskDone = @"PomodoroTaskDone"; -static NSString *kPomodoroTimeChanged = @"PomodoroTimeChanged"; - -NSString *documentDirectory(); - -int yearOfDate(NSDate *date); -int monthOfDate(NSDate *date); -int dayOfDate(NSDate *date); - -BOOL isSameDay(NSDate *oneDate, NSDate *anotherDate); \ No newline at end of file diff --git a/PomoTimer/LSPomoFunction.m b/PomoTimer/LSPomoFunction.m deleted file mode 100644 index 77c98a2..0000000 --- a/PomoTimer/LSPomoFunction.m +++ /dev/null @@ -1,62 +0,0 @@ -// -// LSPomoFunction.m -// PomoTimer -// -// Created by Lingostar on 13. 1. 9.. -// Copyright (c) 2013년 Lingostar. All rights reserved. -// - -#import "LSPomoFunction.h" - -NSString *documentDirectory() -{ - NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); - return [documentPaths lastObject]; -} - - -int yearOfDate(NSDate *date) -{ - NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; - unsigned int unitFlags = NSMonthCalendarUnit | NSYearCalendarUnit | NSDayCalendarUnit; - NSDateComponents *comps = [gregorian components:unitFlags fromDate:date]; - return comps.year; -} - -int monthOfDate(NSDate *date) -{ - NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; - unsigned int unitFlags = NSMonthCalendarUnit | NSYearCalendarUnit | NSDayCalendarUnit; - NSDateComponents *comps = [gregorian components:unitFlags fromDate:date]; - return comps.month; -} - -int dayOfDate(NSDate *date) -{ - NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; - unsigned int unitFlags = NSMonthCalendarUnit | NSYearCalendarUnit | NSDayCalendarUnit; - NSDateComponents *comps = [gregorian components:unitFlags fromDate:date]; - return comps.day; -} - -BOOL isSameDay(NSDate *oneDate, NSDate *anotherDate) -{ - if (oneDate == nil | anotherDate == nil) return NO; - NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; - unsigned int unitFlags = NSMonthCalendarUnit | NSYearCalendarUnit | NSDayCalendarUnit; - NSDateComponents *comps = [gregorian components:unitFlags fromDate:oneDate toDate:anotherDate options:0]; - int years = [comps year]; - int months = [comps month]; - int days = [comps day]; - - - /* - int years = [self yearOfDate:lastPomoDate] - [self yearOfDate:[NSDate date]]; - int months = [self monthOfDate:lastPomoDate] - [self monthOfDate:[NSDate date]]; - int days = [self dayOfDate:lastPomoDate] - [self dayOfDate:[NSDate date]]; - */ - if (years + months + days == 0){ - return YES; - } - return NO; -} \ No newline at end of file diff --git a/PomoTimer/LSPomoTask.h b/PomoTimer/LSPomoTask.h index e687d89..e59a66b 100644 --- a/PomoTimer/LSPomoTask.h +++ b/PomoTimer/LSPomoTask.h @@ -9,7 +9,12 @@ #import #import -@interface LSPomoTask : NSObject +static NSString *kPomodoroTaskDone = @"PomodoroTaskDone"; +static NSString *kPomodoroTimeChanged = @"PomodoroTimeChanged"; + +@interface LSPomoTask : NSObject + +- (void)stopTask; @property int taskTimeInSecond; @@ -23,11 +28,4 @@ #define PAUSE 2 #define DONE 3 -@property (nonatomic, retain) NSString *taskName; -@property NSDate *startDate; -@property NSDate *endDate; - -- (NSString *)periodString; -- (void)resetTask; - @end diff --git a/PomoTimer/LSPomoTask.m b/PomoTimer/LSPomoTask.m index a52403e..5bfa07e 100644 --- a/PomoTimer/LSPomoTask.m +++ b/PomoTimer/LSPomoTask.m @@ -10,10 +10,8 @@ @interface LSPomoTask () { - NSTimer *_pomodoroTimer; - UILocalNotification *_doneNotification; + NSTimer *_pomodoroTimer; } -- (void)invalidateTask; @end @implementation LSPomoTask @@ -23,61 +21,14 @@ - (id)init self = [super init]; if (self != nil){ _status = READY; - self.taskName = @"Non Title."; [self addObserver:self forKeyPath:@"status" options:NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld context:nil]; } return self; } -- (id)initWithCoder:(NSCoder *)aDecoder -{ - self = [super init]; - if (self != nil){ - - _taskTimeInSecond = [aDecoder decodeIntegerForKey:@"TaskTimeInSecond"]; - _typeOfTask = [aDecoder decodeIntegerForKey:@"TypeOfTask"]; - self.startDate = [aDecoder decodeObjectForKey:@"StartDate"]; - self.endDate = [aDecoder decodeObjectForKey:@"EndDate"]; - int unarchStatus = [aDecoder decodeIntegerForKey:@"Status"]; - self.taskName = [aDecoder decodeObjectForKey:@"TaskName"]; - - if (unarchStatus == COUNTING){ - if (isSameDay(_startDate, [NSDate date])) { - _status = COUNTING; - } else { - _status = PAUSE; - } - } else { - _status = unarchStatus; - } - - [self addObserver:self forKeyPath:@"status" options:NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld | NSKeyValueObservingOptionInitial context:nil]; - } - return self; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder -{ - [aCoder encodeInteger:_taskTimeInSecond forKey:@"TaskTimeInSecond"]; - [aCoder encodeInteger:_typeOfTask forKey:@"TypeOfTask"]; - [aCoder encodeInteger:_status forKey:@"Status"]; - [aCoder encodeObject:_startDate forKey:@"StartDate"]; - [aCoder encodeObject:_endDate forKey:@"EndDate"]; - [aCoder encodeObject:_taskName forKey:@"TaskName"]; -} - -- (NSString *)description -{ - NSString *descString = [NSString stringWithFormat:@"Type = %d , Name = %@\r\n TimeLeft = %d\r\n Status = %d\r\n StartDate = %@\r\n EndDate = %@", _typeOfTask, _taskName, _taskTimeInSecond, _status, _startDate, _endDate]; - - return descString; -} - - - (void)dealloc { [self removeObserver:self forKeyPath:@"status"]; - [self invalidateTask]; } - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context @@ -85,49 +36,28 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N int oldValue = [[change valueForKey:NSKeyValueChangeOldKey] intValue]; int newValue = [[change valueForKey:NSKeyValueChangeNewKey] intValue]; - if (oldValue == newValue) return; - if (oldValue == DONE){ //에러처리 } if (newValue == READY){ //에러처리 - NSLog(@"New Value is READY"); } switch (newValue) { - case READY: - self.taskTimeInSecond = POMODORO_TIME; - [[NSNotificationCenter defaultCenter] postNotificationName:kPomodoroTimeChanged object:self]; - break; case COUNTING: - [[NSNotificationCenter defaultCenter] postNotificationName:kPomodoroTimeChanged object:self]; - if (oldValue == READY & self.startDate == nil){ - self.startDate = [NSDate date]; - } _pomodoroTimer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(timeGoes:) userInfo:nil repeats:YES]; - [[UIApplication sharedApplication] setIdleTimerDisabled:YES]; - _doneNotification = [[UILocalNotification alloc] init]; - _doneNotification.fireDate = [NSDate dateWithTimeIntervalSinceNow:self.taskTimeInSecond]; - _doneNotification.alertBody = [NSString stringWithFormat:@"Task %@ is done", self.taskName]; - _doneNotification.applicationIconBadgeNumber = 1; - [[UIApplication sharedApplication] scheduleLocalNotification:_doneNotification]; break; case PAUSE: - [[NSNotificationCenter defaultCenter] postNotificationName:kPomodoroTimeChanged object:self]; - [[UIApplication sharedApplication] setIdleTimerDisabled:NO]; - - [self invalidateTask]; + [_pomodoroTimer invalidate]; + _pomodoroTimer = nil; break; case DONE: - self.endDate = [NSDate date]; - [self invalidateTask]; + [_pomodoroTimer invalidate]; + _pomodoroTimer = nil; [[NSNotificationCenter defaultCenter] postNotificationName:kPomodoroTaskDone object:self]; - [[UIApplication sharedApplication] setIdleTimerDisabled:NO]; - break; } } @@ -147,35 +77,9 @@ - (void)timeGoes:(NSTimer *)timer } } -- (void)resetTask -{ - [self invalidateTask]; - - self.status = READY; - self.startDate = nil; - self.endDate = nil; -} - -- (void)invalidateTask +- (void)stopTask { [_pomodoroTimer invalidate]; _pomodoroTimer = nil; - - [[UIApplication sharedApplication] cancelLocalNotification:_doneNotification]; - _doneNotification = nil; -} - -- (NSString *)periodString -{ - NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; - [dateFormatter setDateFormat:@"HH:mm"]; - [dateFormatter setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"KST"]]; - - NSString *startDateString = [dateFormatter stringFromDate:self.startDate] == nil ? @"READY" : [dateFormatter stringFromDate:self.startDate]; - NSString *endDateString = [dateFormatter stringFromDate:self.endDate] == nil ? @"" : [dateFormatter stringFromDate:self.endDate]; - - NSString *periodString = [NSString stringWithFormat:@"%@ ~ %@",startDateString, endDateString]; - - return periodString; } @end diff --git a/PomoTimer/LSTableViewController.h b/PomoTimer/LSTableViewController.h new file mode 100644 index 0000000..466c055 --- /dev/null +++ b/PomoTimer/LSTableViewController.h @@ -0,0 +1,13 @@ +// +// LSTableViewController.h +// PomoTimer +// +// Created by Lingostar on 12. 12. 30.. +// Copyright (c) 2012년 Lingostar. All rights reserved. +// + +#import + +@interface LSTableViewController : UITableViewController + +@end diff --git a/PomoTimer/LSHistoryListViewController.m b/PomoTimer/LSTableViewController.m similarity index 54% rename from PomoTimer/LSHistoryListViewController.m rename to PomoTimer/LSTableViewController.m index a72b695..59178e7 100644 --- a/PomoTimer/LSHistoryListViewController.m +++ b/PomoTimer/LSTableViewController.m @@ -1,38 +1,40 @@ // -// LSHistoryListViewController.m +// LSTableViewController.m // PomoTimer // -// Created by Lingostar on 13. 1. 6.. -// Copyright (c) 2013년 Lingostar. All rights reserved. +// Created by Lingostar on 12. 12. 30.. +// Copyright (c) 2012년 Lingostar. All rights reserved. // -#import "LSHistoryListViewController.h" -#import "LSAppDelegate.h" -#import "LSHistoryDetailViewController.h" -#import "LSPomoCycle.h" +#import "LSTableViewController.h" +#import "LSTaskViewController.h" -@interface LSHistoryListViewController () +@interface LSTableViewController () -- (LSAppDelegate *)appDelegate; @end -@implementation LSHistoryListViewController +@implementation LSTableViewController -/*- (id)initWithStyle:(UITableViewStyle)style +- (id)initWithStyle:(UITableViewStyle)style { self = [super initWithStyle:style]; if (self) { // Custom initialization + } return self; -}*/ +} - (void)viewDidLoad { [super viewDidLoad]; - self.navigationController.navigationBar.barStyle = UIBarStyleBlack; - self.title = @"History"; + + // Uncomment the following line to preserve selection between presentations. + // self.clearsSelectionOnViewWillAppear = NO; + + // Uncomment the following line to display an Edit button in the navigation bar for this view controller. + // self.navigationItem.rightBarButtonItem = self.editButtonItem; } - (void)didReceiveMemoryWarning @@ -41,22 +43,28 @@ - (void)didReceiveMemoryWarning // Dispose of any resources that can be recreated. } -- (LSAppDelegate *)appDelegate +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - return [[UIApplication sharedApplication] delegate]; + LSTaskViewController *destController = segue.destinationViewController; + NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow]; + destController.indexPathRow = indexPath.row; + } #pragma mark - Table view data source - +/* - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { - return 1; +#warning Potentially incomplete method implementation. + // Return the number of sections. + return 0; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - int numberOfHistory = [[self appDelegate].dailyPomodoroArray count]; - return numberOfHistory; +#warning Incomplete method implementation. + // Return the number of rows in the section. + return 0; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath @@ -64,34 +72,11 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath]; - NSDictionary *dailyPomodoro = [[self appDelegate].dailyPomodoroArray objectAtIndex:indexPath.row]; - NSDate *pomodoroDate = [dailyPomodoro valueForKey:kPomodoroDateKey]; - - NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; - [dateFormatter setDateFormat:@"yyyy년 MM월dd일의 작업"]; - [dateFormatter setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"KST"]]; - - cell.textLabel.text = [dateFormatter stringFromDate:pomodoroDate]; + // Configure the cell... - NSArray *pomoCycleArray = [dailyPomodoro valueForKey:kPomodoroCyclesKey]; - LSPomoCycle *currentCycle = [pomoCycleArray lastObject]; - int dailyCycle, dailyTimes, dailyTotal; - dailyCycle = [pomoCycleArray count] - 1; - dailyTimes = [currentCycle doneTaskCount]; - dailyTotal = dailyCycle*4 + dailyTimes; - NSString *cycleString = [NSString stringWithFormat:@"%d Cycle %d Times , Total %d Pomodoro", dailyCycle, dailyTimes, dailyTotal]; - cell.detailTextLabel.text = cycleString; return cell; } - - -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender -{ - LSHistoryDetailViewController *destController = segue.destinationViewController; - NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow]; - NSDictionary *dailyPomodoro = [[self appDelegate].dailyPomodoroArray objectAtIndex:indexPath.row]; - destController.pomodoroOfTheDay = dailyPomodoro; -} +*/ /* // Override to support conditional editing of the table view. - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath @@ -136,12 +121,12 @@ - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *) - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // Navigation logic may go here. Create and push another view controller. - - //LSHistoryDetailViewController *detailViewController = [[LSHistoryDetailViewController alloc] initWithNibName:@"<#Nib name#>" bundle:nil]; + /* + <#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:@"<#Nib name#>" bundle:nil]; // ... // Pass the selected object to the new view controller. - //[self.navigationController pushViewController:detailViewController animated:YES]; + [self.navigationController pushViewController:detailViewController animated:YES]; + */ } - @end diff --git a/PomoTimer/LSTaskViewController.h b/PomoTimer/LSTaskViewController.h index efb9321..7ea33f5 100644 --- a/PomoTimer/LSTaskViewController.h +++ b/PomoTimer/LSTaskViewController.h @@ -1,5 +1,5 @@ // -// LSTaskViewController.h +// LSViewController.h // PomoTimer // // Created by Lingostar on 12. 12. 30.. @@ -7,11 +7,12 @@ // #import -@class LSPomoCycle; @interface LSTaskViewController : UIViewController +@property (weak, nonatomic) IBOutlet UILabel *timeLabel; +@property int indexPathRow; + +- (IBAction)startPause:(id)sender; +- (IBAction)stop:(id)sender; -@property (weak, nonatomic) IBOutlet UIScrollView *taskScrollView; -@property NSDictionary *todaysPomodoroDict; -@property LSPomoCycle *pomoCycle; @end diff --git a/PomoTimer/LSTaskViewController.m b/PomoTimer/LSTaskViewController.m index 3a2897b..78fa75f 100644 --- a/PomoTimer/LSTaskViewController.m +++ b/PomoTimer/LSTaskViewController.m @@ -1,5 +1,5 @@ // -// LSTaskViewController.m +// LSViewController.m // PomoTimer // // Created by Lingostar on 12. 12. 30.. @@ -8,23 +8,9 @@ #import "LSTaskViewController.h" #import "LSPomoCycle.h" -#import "LSAppDelegate.h" -#import "LSNumberPushingView.h" -#import "LSTimerButton.h" -#import "LSToDoTableViewController.h" - -@interface LSTaskViewController () +@interface LSTaskViewController () { - UIView *_timerView; - LSTimerButton *_pomoTimerButton; - UIButton *_resetButton; - - UIView *_recordView; - LSNumberPushingView *_cycleView; - - UITableView *_todaysHistoryTableView; - - LSToDoTableViewController *_todoTableViewController; + LSPomoCycle *_pomoCycle; } @end @@ -33,94 +19,28 @@ @implementation LSTaskViewController - (void)viewDidLoad { [super viewDidLoad]; + // Do any additional setup after loading the view, typically from a nib. + NSLog(@"indexPathRow = %d", self.indexPathRow); - [self viewInitialize]; - - self.todaysPomodoroDict = [self appDelegate].todaysPomodoro; - - _pomoCycle = [self nextAvailableCycle]; - - self.navigationController.navigationBar.barStyle = UIBarStyleBlack; - - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pomodoroUpdate:) name:kPomodoroTaskDone object:nil]; - - [self pomodoroUpdate:nil]; -} - -- (void)viewInitialize -{ - self.taskScrollView.scrollEnabled = YES; - - _timerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 550)]; - - _pomoTimerButton = [[LSTimerButton alloc] initWithFrame:CGRectMake(0,200,320, 320)]; - [_pomoTimerButton addTarget:self action:@selector(startPause) forControlEvents:UIControlEventTouchUpInside]; - [_timerView addSubview:_pomoTimerButton]; - - _resetButton = [[UIButton alloc] initWithFrame:CGRectMake(240, 510, 60, 30)]; - [_resetButton setBackgroundImage:[UIImage imageNamed:@"button_reset"] forState:UIControlStateNormal]; - [_resetButton addTarget:self action:@selector(reset:) forControlEvents:UIControlEventTouchUpInside]; - [_timerView addSubview:_resetButton]; - - [self.taskScrollView addSubview:_timerView]; - - UINib *recordNib = [UINib nibWithNibName:@"RecordView" bundle:nil]; - NSArray *views = [recordNib instantiateWithOwner:self options:nil]; - _recordView = [views lastObject]; - _recordView.frame = CGRectMake(0, 20, 320, 60); - - _cycleView = [[LSNumberPushingView alloc] initWithFrame:CGRectMake(40, 12, 38, 29) numType:CYCLE_NUM]; - _cycleView.maxNum = 9; - [_recordView addSubview:_cycleView]; - - [self.taskScrollView addSubview:_recordView]; - - _todaysHistoryTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 320, 10) style:UITableViewStylePlain]; - _todaysHistoryTableView.scrollEnabled = NO; - _todaysHistoryTableView.dataSource = self; - _todaysHistoryTableView.delegate = self; - [_todaysHistoryTableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"DetailCell"]; - - [self.taskScrollView addSubview:_todaysHistoryTableView]; - -} - --(LSAppDelegate *)appDelegate -{ - return [[UIApplication sharedApplication] delegate]; -} - -- (void)createNewPomoCycle -{ - [[self appDelegate] createNewPomoCycle]; - - int count = [[[self appDelegate] todaysPomoCycleArray] count] -1; - - _cycleView.targetPanelNum = count%10; - + _pomoCycle = [[LSPomoCycle alloc] initWithType:self.indexPathRow]; [self updatePomodoroImageView]; -} -- (void)viewWillAppear:(BOOL)animated -{ - [super viewWillAppear:animated]; - [self updateWorkTitle]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(labelUpdate:) name:kPomodoroTimeChanged object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pomodoroUpdate:) name:kPomodoroTaskDone object:nil]; } - (void)viewDidAppear:(BOOL)animated { - [super viewDidAppear:animated]; - [self updateViewLayout]; + //NSLog(@"indexPathRow = %d", self.indexPathRow); + } - (void)viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; -} - -- (void)dealloc -{ [[NSNotificationCenter defaultCenter] removeObserver:self name:kPomodoroTaskDone object:nil]; + [[NSNotificationCenter defaultCenter] removeObserver:self name:kPomodoroTimeChanged object:nil]; } - (void)didReceiveMemoryWarning @@ -129,228 +49,70 @@ - (void)didReceiveMemoryWarning // Dispose of any resources that can be recreated. } -- (void)startPause -{ - LSPomoTask *currentTask = _pomoCycle.currentTask; - - int currentStatus = currentTask.status; + +- (IBAction)startPause:(id)sender { + UIButton *startPauseButton = (UIButton *)sender; - switch (currentStatus) { - case READY: - currentTask.status = COUNTING; - break; - case PAUSE: - currentTask.status = COUNTING; - break; - case COUNTING: - currentTask.status = PAUSE; - break; - default: - break; + int currentStatus = _pomoCycle.currentTask.status; + if (currentStatus == READY || currentStatus == PAUSE){ + _pomoCycle.currentTask.status = COUNTING; + [startPauseButton setTitle:@"PAUSE" forState:UIControlStateNormal]; + } else if (currentStatus == COUNTING){ + _pomoCycle.currentTask.status = PAUSE; + [startPauseButton setTitle:@"RESUME" forState:UIControlStateNormal]; } - - [_todaysHistoryTableView reloadData]; - [self updateViewLayout]; - [self updateTimerImageView]; } -- (IBAction)reset:(id)sender -{ - LSPomoTask *currentTask = _pomoCycle.currentTask; - if (currentTask.typeOfTask == POMODORO) { - [_pomoCycle resetCurrentTask]; - [self updateTimerImageView]; - [_todaysHistoryTableView reloadData]; - } +- (IBAction)stop:(id)sender { + _pomoCycle = nil; + [self.navigationController popViewControllerAnimated:YES]; } -- (void)updateWorkTitle -{ - LSPomoTask *currentTask = _pomoCycle.currentTask; - self.navigationItem.title = currentTask.taskName; -} -- (void)updateViewLayout +- (void)labelUpdate:(NSNotification *)notification { - float yPosition = 0; - _timerView.frame = CGRectMake(0, yPosition-170, 320, 550); - yPosition += 380; - _recordView.frame = CGRectMake(0, yPosition, 320, 60); - yPosition += 60; - float tableViewHeight = _todaysHistoryTableView.contentSize.height; - if (tableViewHeight > 0){ - _todaysHistoryTableView.frame = CGRectMake(0, yPosition, 320, tableViewHeight); - } - yPosition += tableViewHeight; - self.taskScrollView.contentSize = CGSizeMake(320, yPosition); + LSPomoTask *currentTask = [notification object]; + int timesLeft = currentTask.taskTimeInSecond; + int taskMinute = timesLeft/60; + int taskSecond = timesLeft%60; + + NSString *timeString = [NSString stringWithFormat:@"%.2d:%.2d", taskMinute, taskSecond]; + self.timeLabel.text = timeString; } - - (void)pomodoroUpdate:(NSNotification *)notification { + LSPomoTask *doneTask = [notification object]; if (doneTask.typeOfTask == POMODORO){ [self updatePomodoroImageView]; } - //뽀모도로 사이클이 끝난 것이므로 새로운 사이클을 만들어야 한다. AppDelegate에 넣는 것도 잊지말고. LSPomoTask *newTask = _pomoCycle.currentTask; - if (newTask == nil){//다음 사이클이 있는 경우 사이클 오브젝트 변경 - _pomoCycle = [self nextAvailableCycle]; - newTask = _pomoCycle.currentTask; - } - - if (notification != nil) - newTask.status = COUNTING; - - - [self updateTimerImageView]; - [_todaysHistoryTableView reloadData]; - [self updateViewLayout]; - [self updateWorkTitle]; -} - -- (LSPomoCycle *)nextAvailableCycle -{ - NSMutableArray *pomoCycles = [[self appDelegate] todaysPomoCycleArray]; - NSUInteger firstCycleIndex = [pomoCycles indexOfObjectPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop){ - if ([(LSPomoCycle *)obj doneTaskCount] < 4){ - *stop = YES; - return YES; - } - return NO; - }]; - NSLog(@"Next Cyce Index = %d", firstCycleIndex); - if (firstCycleIndex != NSNotFound){ - _pomoCycle = [pomoCycles objectAtIndex:firstCycleIndex]; - } else { - [self createNewPomoCycle]; + if (newTask == nil){ + [self.navigationController popViewControllerAnimated:YES]; } - return _pomoCycle; } - (void)updatePomodoroImageView { LSPomoTask *task; - - for (int i = 0; i < [_pomoCycle.pomoArray count]; i++) { - task = [_pomoCycle.pomoArray objectAtIndex:i]; - - UIImageView *pomodoroImageView = (UIImageView *)[_recordView viewWithTag:(500+i)]; - UILabel *pomodoroNumberLabel = (UILabel *)[_recordView viewWithTag:(400+i)]; - NSString *pomodoroImageName; - switch (task.status) { - case READY: case PAUSE: case COUNTING: - pomodoroImageName = @"Pomodoro_Off"; - pomodoroNumberLabel.font = [UIFont systemFontOfSize:8]; - pomodoroNumberLabel.textColor = [UIColor lightGrayColor]; - break; - case DONE: - pomodoroImageName = @"Pomodoro_On"; - pomodoroNumberLabel.font = [UIFont boldSystemFontOfSize:8]; - pomodoroNumberLabel.textColor = [UIColor darkGrayColor]; - break; - - } - pomodoroImageView.image = [UIImage imageNamed:pomodoroImageName]; - - } -} -- (void)updateTimerImageView -{ - LSPomoTask *currentTask = _pomoCycle.currentTask; - [_pomoTimerButton updateTimerImage:currentTask]; - - if (currentTask.typeOfTask == POMODORO) { - switch (currentTask.status) { - case COUNTING: case DONE: case READY: - [_timerView setBackgroundColor:[UIColor colorWithWhite:0.9 alpha:1]]; - [_resetButton setBackgroundImage:[UIImage imageNamed:@"button_reset"] forState:UIControlStateNormal]; - break; - case PAUSE: - [_timerView setBackgroundColor:[UIColor colorWithRed:0.66 green:0.66 blue:0.76 alpha:1.0]]; - break; - default: - break; + for (int i = 0; i < [_pomoCycle.taskArray count]; i++) { + task = [_pomoCycle.taskArray objectAtIndex:i]; + if (task.typeOfTask == POMODORO) { + UIImageView *pomodoroImageView = (UIImageView *)[self.view viewWithTag:(500+i)]; + NSString *pomodoroImageName; + switch (task.status) { + case READY: case PAUSE: case COUNTING: + pomodoroImageName = @"Pomodoro_Off"; + break; + case DONE: + pomodoroImageName = @"Pomodoro_On"; + break; + } + pomodoroImageView.image = [UIImage imageNamed:pomodoroImageName]; } - } else if (currentTask.typeOfTask == RECESS) - { - [_timerView setBackgroundColor:[UIColor colorWithRed:0.82 green:0.65 blue:0.66 alpha:1.0]]; - [_resetButton setBackgroundImage:[UIImage imageNamed:@"button_reset_enable"] forState:UIControlStateNormal]; } } - -- (IBAction)showTodoTable:(id)sender { - - _todoTableViewController =[[LSToDoTableViewController alloc] initWithStyle:UITableViewStylePlain]; - - UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:_todoTableViewController]; - - [self presentViewController:nav animated:YES completion:nil]; -} - -#pragma mark - Table view data source - -- (int)sectionCountForEntry -{ - int sectionCount = 0; - for (LSPomoCycle *pomoCycle in [[self appDelegate] todaysPomoCycleArray]) { - if ([pomoCycle startedTaskCount] > 0) sectionCount ++; - } - return sectionCount; -} - -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - int numberOfCycle = [self sectionCountForEntry]; - return numberOfCycle; -} - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - NSMutableArray *pomoCycles = [[self appDelegate] todaysPomoCycleArray]; - int numOfCycle = [self sectionCountForEntry]; - LSPomoCycle *thisCycle = [pomoCycles objectAtIndex:numOfCycle - (section + 1)]; - int rowCount = [thisCycle startedTaskCount]; - - if (rowCount == 0) - rowCount++; - NSLog(@"current section: %d, row count: %d", section, rowCount); - return rowCount; -} - - -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - static NSString *CellIdentifier = @"DetailCell"; - - UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier]; - - NSMutableArray *pomoCycles = [[self appDelegate] todaysPomoCycleArray]; - int numOfCycle = [self sectionCountForEntry]; - LSPomoCycle *pomoCycle = [pomoCycles objectAtIndex: numOfCycle - (indexPath.section +1)]; - - int numOfPomo = [pomoCycle startedTaskCount]; - int pomoIndex = 0; - if (numOfPomo > 0) pomoIndex = numOfPomo - (indexPath.row+1); - LSPomoTask *currentTask = [pomoCycle.pomoArray objectAtIndex:pomoIndex]; - - cell.textLabel.text = currentTask.taskName; - cell.detailTextLabel.text = [NSString stringWithFormat:@"%@",currentTask.periodString]; - - return cell; -} - -- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section -{ - UILabel *sectionLabel = [[UILabel alloc] init]; - int numOfCycle = [self sectionCountForEntry]; - sectionLabel.text = [NSString stringWithFormat:@" Cycle %d", numOfCycle - section]; - sectionLabel.backgroundColor = [UIColor darkGrayColor]; - sectionLabel.textColor = [UIColor whiteColor]; - sectionLabel.font = [UIFont boldSystemFontOfSize:12]; - return sectionLabel; -} - @end diff --git a/PomoTimer/LSTimerButton.h b/PomoTimer/LSTimerButton.h deleted file mode 100644 index d5df419..0000000 --- a/PomoTimer/LSTimerButton.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// LSTimerButton.h -// PomoTimer -// -// Created by Lingostar on 13. 2. 12.. -// Copyright (c) 2013년 Lingostar. All rights reserved. -// - -#import -#import "LSPomoTask.h" -@interface LSTimerButton : UIControl - - --(void)updateTimerImage:(LSPomoTask *)currentTask; -@end diff --git a/PomoTimer/LSTimerButton.m b/PomoTimer/LSTimerButton.m deleted file mode 100644 index 6765425..0000000 --- a/PomoTimer/LSTimerButton.m +++ /dev/null @@ -1,245 +0,0 @@ -// -// LSTimerButton.m -// PomoTimer -// -// Created by Lingostar on 13. 2. 12.. -// Copyright (c) 2013년 Lingostar. All rights reserved. -// - -#import "LSTimerButton.h" -#import -#import "UIImage+ColorAtPixel.h" - - -@interface LSTimerButton () -{ - UIImageView *_progressPoint; - UIImageView *_timerPanel; - UIImageView *_playPauseImage; - UILabel *_timeLabel; - - float _rotateAngle; -} -@property (nonatomic, assign) CGPoint previousTouchPoint; -@property (nonatomic, assign) BOOL previousTouchHitTestResponse; -@end - -@implementation LSTimerButton -@synthesize previousTouchPoint = _previousTouchPoint; -@synthesize previousTouchHitTestResponse = _previousTouchHitTestResponse; - -- (id)initWithFrame:(CGRect)frame -{ - self = [super initWithFrame:frame]; - if (self) { - self.clipsToBounds = YES; - [self setUpTimer]; - - _rotateAngle = 0; - - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(rotatePointWithPomodoro:) name:kPomodoroTimeChanged object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(labelUpdate:) name:kPomodoroTimeChanged object:nil]; - } - - return self; -} - -- (void)setUpTimer -{ - CGRect bounds = self.bounds; - CGPoint center = CGPointMake(bounds.size.width/2, bounds.size.height/2); - - - _timerPanel = [[UIImageView alloc] initWithFrame:bounds]; - [_timerPanel setImage:[UIImage imageNamed:@"panel_default"]]; - [_timerPanel setContentMode:UIViewContentModeScaleAspectFit]; - [_timerPanel setCenter:center]; - - [self addSubview:_timerPanel]; - - - - _progressPoint = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"point_black"]]; - _progressPoint.contentMode = UIViewContentModeScaleAspectFit; - CGSize pointSize = _progressPoint.bounds.size; - _progressPoint.frame = CGRectMake(center.x-(pointSize.width/2), center.y-(pointSize.height/2), pointSize.width, pointSize.height); - _progressPoint.layer.anchorPoint = CGPointMake(0.5, 1.0); - [self addSubview:_progressPoint]; - - - _timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(85, 170, 150, 40)]; - _timeLabel.text=@"25:00"; - _timeLabel.textAlignment=NSTextAlignmentCenter; - _timeLabel.backgroundColor = [UIColor colorWithWhite:0 alpha:0]; - _timeLabel.textColor=[UIColor colorWithWhite:0.8 alpha:1]; - _timeLabel.font=[UIFont systemFontOfSize:50.0]; - [self addSubview:_timeLabel]; - - _playPauseImage = [[UIImageView alloc] initWithFrame:CGRectMake(135, 95, 60, 60)]; - _playPauseImage.image = [UIImage imageNamed:@"status_play"]; - [self addSubview:_playPauseImage]; -} - --(void)rotatePointWithPomodoro:(NSNotification *)notification -{ - LSPomoTask *currentTask; - if (notification != nil) { - currentTask = [notification object]; - } - - if (currentTask.typeOfTask == POMODORO) { - - float taskTime = (float)currentTask.taskTimeInSecond; - float pomoTime = (float)POMODORO_TIME; - float unitValue = taskTime / pomoTime; - float currentAngle = - unitValue * M_PI *2; - CATransform3D rotationTransform = CATransform3DMakeRotation(currentAngle, 0.0, 0.0, 1.0); - _progressPoint.layer.transform = rotationTransform; - } -} - - --(void)updateTimerImage:(LSPomoTask *)currentTask -{ - int pomoType = currentTask.typeOfTask; - int pomoStatus = currentTask.status; - - [self updatePointImage:pomoType status:pomoStatus]; - [self updateTimerColor:pomoType status:pomoStatus]; - [self updateStateImage:pomoStatus]; -} - --(void)updatePointImage:(int)pomoType status:(int)pomoStatus -{ - - if (pomoType == POMODORO && pomoStatus == COUNTING) { - _progressPoint.image = [UIImage imageNamed:@"point_red"]; - } else { - _progressPoint.image = [UIImage imageNamed:@"point_black"]; - } - -} --(void)updateTimerColor:(int)pomoType status:(int)pomoStatus -{ - - if (pomoType == POMODORO) { - switch (pomoStatus) { - case PAUSE : - _timerPanel.image = [UIImage imageNamed:@"panel_pomo_pause"]; - break; - default: - _timerPanel.image = [UIImage imageNamed:@"panel_default"]; - break; - } - } else if (pomoType == RECESS) { - _timerPanel.image = [UIImage imageNamed:@"panel_recess"]; - } - - -} - --(void)updateStateImage:(int)pomoStatus -{ - switch (pomoStatus) { - case COUNTING: - _playPauseImage.image = [UIImage imageNamed:@"status_pause"]; - break; - - default: - _playPauseImage.image = [UIImage imageNamed:@"status_play"]; - break; - } - -} - -- (void)labelUpdate:(NSNotification *)notification -{ - LSPomoTask *currentTask; - if (notification != nil) { - currentTask = [notification object]; - } - - int timesLeft = currentTask.taskTimeInSecond; - int taskMinute = timesLeft/60; - int taskSecond = timesLeft%60; - - NSString *timeString = [NSString stringWithFormat:@"%.2d:%.2d", taskMinute, taskSecond]; - _timeLabel.text = timeString; -} - -- (BOOL)isAlphaVisibleAtPoint:(CGPoint)point forImage:(UIImage *)image -{ - // Correct point to take into account that the image does not have to be the same size - // as the button. See https://github.com/ole/OBShapedButton/issues/1 - CGSize iSize = image.size; - CGSize bSize = self.bounds.size; - point.x *= (bSize.width != 0) ? (iSize.width / bSize.width) : 1; - point.y *= (bSize.height != 0) ? (iSize.height / bSize.height) : 1; - - UIColor *pixelColor = [image colorAtPixel:point]; - CGFloat alpha = 0.0; - - - if ([pixelColor respondsToSelector:@selector(getRed:green:blue:alpha:)]) - {// available from iOS 5.0 - [pixelColor getRed:NULL green:NULL blue:NULL alpha:&alpha]; - } - else - {// for iOS < 5.0 - // In iOS 6.1 the code is not working in release mode, it works only in debug - // CGColorGetAlpha always return 0. - CGColorRef cgPixelColor = [pixelColor CGColor]; - alpha = CGColorGetAlpha(cgPixelColor); - } - return alpha >= 0.1f; -} - - -// UIView uses this method in hitTest:withEvent: to determine which subview should receive a touch event. -// If pointInside:withEvent: returns YES, then the subview’s hierarchy is traversed; otherwise, its branch -// of the view hierarchy is ignored. -- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event -{ - // Return NO if even super returns NO (i.e., if point lies outside our bounds) - BOOL superResult = [super pointInside:point withEvent:event]; - if (!superResult) { - return superResult; - } - - // Don't check again if we just queried the same point - // (because pointInside:withEvent: gets often called multiple times) - if (CGPointEqualToPoint(point, self.previousTouchPoint)) { - return self.previousTouchHitTestResponse; - } else { - self.previousTouchPoint = point; - } - - // We can't test the image's alpha channel if the button has no image. Fall back to super. - UIImage *buttonImage = _timerPanel.image; - - - BOOL response = NO; - - if (buttonImage == nil) { - response = YES; - } - else if (buttonImage != nil) { - response = [self isAlphaVisibleAtPoint:point forImage:buttonImage]; - } - - - self.previousTouchHitTestResponse = response; - return response; -} - - -/* -// Only override drawRect: if you perform custom drawing. -// An empty implementation adversely affects performance during animation. -- (void)drawRect:(CGRect)rect -{ - // Drawing code -} -*/ - -@end diff --git a/PomoTimer/LSToDoTableViewController.h b/PomoTimer/LSToDoTableViewController.h deleted file mode 100644 index ec38c20..0000000 --- a/PomoTimer/LSToDoTableViewController.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// LSToDoTableViewController.h -// PomoToDoTable -// -// Created by Lingostar on 13. 2. 14.. -// Copyright (c) 2013년 Lingostar. All rights reserved. -// - -#import - -@interface LSToDoTableViewController : UITableViewController - -@end diff --git a/PomoTimer/LSToDoTableViewController.m b/PomoTimer/LSToDoTableViewController.m deleted file mode 100644 index 72efe62..0000000 --- a/PomoTimer/LSToDoTableViewController.m +++ /dev/null @@ -1,271 +0,0 @@ -// -// LSToDoTableViewController.m -// PomoToDoTable -// -// Created by Lingostar on 13. 2. 14.. -// Copyright (c) 2013년 Lingostar. All rights reserved. -// - -#import "LSToDoTableViewController.h" -#import "LSPomoCycle.h" -#import "LSAppDelegate.h" -#import "LSPomoTask.h" - -#define TASK_IN_CYCLE 4 -@interface LSToDoTableViewController () -{ - NSDictionary *_todaysPomodoroDict; -} - --(LSAppDelegate *)appDelegate; -@property NSMutableArray *pomoCycleArray; -@end - -@implementation LSToDoTableViewController - -- (id)initWithStyle:(UITableViewStyle)style -{ - self = [super initWithStyle:style]; - if (self) { - // Custom initialization - - } - return self; -} - -#pragma mark - View LifeCycle - -- (void)viewDidLoad -{ - [super viewDidLoad]; - self.navigationController.navigationBar.barStyle = UIBarStyleBlack; - self.navigationItem.title = @"Work List"; - _todaysPomodoroDict = [self appDelegate].todaysPomodoro; - - [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"Cell"]; - [self.tableView setEditing:YES animated:YES]; - - self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(createNewCycle)]; - self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(doneEditedList)]; -} - -- (void)didReceiveMemoryWarning -{ - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -- (NSMutableArray *)pomoCycleArray -{ - return [[self appDelegate] todaysPomoCycleArray]; -} - -- (void)createNewCycle -{ - [[self appDelegate] createNewPomoCycle]; - [self.tableView reloadData]; -} - --(void)doneEditedList -{ - [self dismissViewControllerAnimated:YES completion:nil]; -} - --(LSAppDelegate *)appDelegate -{ - return [[UIApplication sharedApplication] delegate]; -} - - -#pragma mark - Table view Display - -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return [self.pomoCycleArray count]; -} - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return TASK_IN_CYCLE; -} - - -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - static NSString *CellIdentifier = @"Cell"; - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath]; - - if ([cell.contentView subviews]) { - for (UIView *subView in [cell.contentView subviews]) { - [subView removeFromSuperview]; - } - } - - LSPomoCycle *currentSectionPomoCycle = [self.pomoCycleArray objectAtIndex:indexPath.section]; - LSPomoTask *currentTask = [currentSectionPomoCycle.pomoArray objectAtIndex:indexPath.row]; - - if ([currentSectionPomoCycle isTaskDone:indexPath.row]) { - cell.textLabel.text = [NSString stringWithFormat:@"%@", currentTask.taskName]; - cell.textLabel.backgroundColor = [UIColor colorWithWhite:0 alpha:0]; - cell.textLabel.font = [UIFont boldSystemFontOfSize:17.0]; - cell.textLabel.textColor = [UIColor lightGrayColor]; - cell.contentView.backgroundColor = [UIColor colorWithRed:0.9 green:0.9 blue:0.9 alpha:1.0]; - } else { - cell.textLabel.text = @""; - UITextField *taskNameField = [[UITextField alloc] initWithFrame:CGRectMake(10, 10, 270, 25)]; - taskNameField.delegate = self; - taskNameField.text = [NSString stringWithFormat:@"%@",currentTask.taskName]; - taskNameField.font = [UIFont boldSystemFontOfSize:17.0]; - taskNameField.clearButtonMode = UITextFieldViewModeWhileEditing; - taskNameField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter; - [cell.contentView addSubview:taskNameField]; - cell.contentView.backgroundColor = [UIColor colorWithRed:1 green:1 blue:1 alpha:1.0]; - } - - return cell; -} - -- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section -{ - UILabel *sectionLabel = [[UILabel alloc] init]; - sectionLabel.backgroundColor = [UIColor darkGrayColor]; - sectionLabel.textColor = [UIColor whiteColor]; - sectionLabel.font = [UIFont boldSystemFontOfSize:12]; - - sectionLabel.text = [NSString stringWithFormat:@" Cycle %d", section+1]; - - return sectionLabel; -} - -#pragma mark - Table view Edit Mode -- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath -{ - return YES; -} - -- (BOOL)tableView:(UITableView *)tableView shouldIndentWhileEditingRowAtIndexPath:(NSIndexPath *)indexPath -{ - return NO; //Default = YES -} - -- (UITableViewCellEditingStyle) tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath -{ - return UITableViewCellEditingStyleNone; -} - - -#pragma mark - Table view Row Reorder - -- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath -{ - LSPomoCycle *currentSectionPomoCycle = [self.pomoCycleArray objectAtIndex:indexPath.section]; - - if ([currentSectionPomoCycle isTaskStarted:indexPath.row]) { - return NO; - } - - return YES; -} - -- (NSIndexPath *)tableView:(UITableView *)tableView targetIndexPathForMoveFromRowAtIndexPath:(NSIndexPath *)sourceIndexPath toProposedIndexPath:(NSIndexPath *)proposedDestinationIndexPath -{ - LSPomoCycle *toCycle = [self.pomoCycleArray objectAtIndex:proposedDestinationIndexPath.section]; - - if (proposedDestinationIndexPath.row > [toCycle.pomoArray count]-1) { - // 섹션의 제일 아래로는 이동이 불가능하고, 다음 섹션 제일 위로만 이동이 가능하게함. - return sourceIndexPath; - } else { - LSPomoTask *toTask = [toCycle.pomoArray objectAtIndex:proposedDestinationIndexPath.row]; - // Done상태 위로는 이동하지 못하도록. - if (toTask.status > READY) { - return sourceIndexPath; - } - } - return proposedDestinationIndexPath; -} - - -- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)destinationIndexPath -{ - NSMutableArray *pomoCycles = self.pomoCycleArray; - - LSPomoCycle *toCycle = [pomoCycles objectAtIndex:destinationIndexPath.section]; - LSPomoTask *toTask = [toCycle.pomoArray objectAtIndex:destinationIndexPath.row]; - if (toTask.status > READY) { - return; - } - - if (sourceIndexPath.section == destinationIndexPath.section) { - int fromIndex = sourceIndexPath.row; - int toIndex = destinationIndexPath.row; - LSPomoCycle *currentCycle = [pomoCycles objectAtIndex:sourceIndexPath.section]; - - NSMutableArray *newArray = [NSMutableArray arrayWithArray:currentCycle.pomoArray]; - - [newArray removeObjectAtIndex:fromIndex]; - [newArray insertObject:[currentCycle.pomoArray objectAtIndex:fromIndex] atIndex:toIndex]; - - currentCycle.pomoArray = newArray; - - } else { - int fromSection = sourceIndexPath.section; - int toSection = destinationIndexPath.section; - int fromIndex = sourceIndexPath.row; - int toIndex = destinationIndexPath.row; - - NSMutableArray *oldArray = [[NSMutableArray alloc] initWithCapacity:10]; - for (int section = 0; section < tableView.numberOfSections; section++) { - LSPomoCycle *cycle = [pomoCycles objectAtIndex:section]; - [oldArray addObjectsFromArray:cycle.pomoArray]; - } - - NSMutableArray *newArray = [[NSMutableArray alloc] initWithArray:oldArray]; - [newArray removeObjectAtIndex:(fromSection * TASK_IN_CYCLE + fromIndex)]; - [newArray insertObject:[oldArray objectAtIndex:(fromSection * TASK_IN_CYCLE + fromIndex)] atIndex:(toSection * TASK_IN_CYCLE + toIndex)]; - - for (int section = 0; section < tableView.numberOfSections; section++) { - LSPomoCycle *cycle = [pomoCycles objectAtIndex:section]; - NSRange range = NSMakeRange(section * TASK_IN_CYCLE, TASK_IN_CYCLE); - NSArray *newPomoArray = [newArray subarrayWithRange:range]; - cycle.pomoArray = newPomoArray; - } - - [self.tableView reloadData]; - } -} - - -#pragma mark - TextField Delegate - -- (BOOL)textFieldShouldEndEditing:(UITextField *)textField -{ - if ([textField.text isEqualToString:@""]) { - return NO; - } - else return YES; -} - -- (void)textFieldDidEndEditing:(UITextField *)textField -{ - - NSString *newTaskName = textField.text; - UIView *textFieldView = [textField superview]; - UITableViewCell *cell = (UITableViewCell *)[textFieldView superview]; - NSIndexPath *_editingIndexPath = [self.tableView indexPathForCell:cell]; - - int pomoIndex = _editingIndexPath.row; - int currentSection = _editingIndexPath.section; - - LSPomoCycle *currentPomoCycle = [self.pomoCycleArray objectAtIndex:currentSection]; - [currentPomoCycle changeTaskName:newTaskName atTaskIndex:pomoIndex]; - [self.pomoCycleArray replaceObjectAtIndex:currentSection withObject:currentPomoCycle]; -} - -- (BOOL)textFieldShouldReturn:(UITextField *)textField -{ - [textField resignFirstResponder]; - return YES; -} - - -@end diff --git a/PomoTimer/MainStoryboard.storyboard b/PomoTimer/MainStoryboard.storyboard index c195573..b321967 100644 --- a/PomoTimer/MainStoryboard.storyboard +++ b/PomoTimer/MainStoryboard.storyboard @@ -1,314 +1,264 @@ - + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + + - - + + + + + + + + + + + + + + + - + + - - + + + + + + + + + + + + + + + - + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - + - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + + - - - + + + + - + - + - - + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + \ No newline at end of file diff --git a/PomoTimer/PomoTimer-Info.plist b/PomoTimer/PomoTimer-Info.plist index acaa8d7..7c613aa 100644 --- a/PomoTimer/PomoTimer-Info.plist +++ b/PomoTimer/PomoTimer-Info.plist @@ -8,17 +8,6 @@ ${PRODUCT_NAME} CFBundleExecutable ${EXECUTABLE_NAME} - CFBundleIcons - - CFBundlePrimaryIcon - - CFBundleIconFiles - - icon_57_57.png - icon_114_114.png - - - CFBundleIdentifier kr.co.lingostar.${PRODUCT_NAME:rfc1034identifier} CFBundleInfoDictionaryVersion @@ -35,8 +24,6 @@ 1.0 LSRequiresIPhoneOS - UIApplicationExitsOnSuspend - UIMainStoryboardFile MainStoryboard UIRequiredDeviceCapabilities @@ -46,6 +33,8 @@ UISupportedInterfaceOrientations UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight diff --git a/PomoTimer/PomoTimer-Prefix.pch b/PomoTimer/PomoTimer-Prefix.pch index 22410ce..3df8084 100644 --- a/PomoTimer/PomoTimer-Prefix.pch +++ b/PomoTimer/PomoTimer-Prefix.pch @@ -11,5 +11,4 @@ #ifdef __OBJC__ #import #import - #import "LSPomoFunction.h" #endif diff --git a/PomoTimer/RecordView.xib b/PomoTimer/RecordView.xib deleted file mode 100644 index a5923b3..0000000 --- a/PomoTimer/RecordView.xib +++ /dev/null @@ -1,1243 +0,0 @@ - - - - 1552 - 12D78 - 3084 - 1187.37 - 626.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 2083 - - - IBNSLayoutConstraint - IBProxyObject - IBUIImageView - IBUILabel - IBUIView - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - PluginDependencyRecalculationVersion - - - - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 1320 - - - - 1320 - - {{116, 16}, {20, 20}} - - - 1 - 500 - NO - IBCocoaTouchFramework - - NSImage - Pomodoro_Off.png - - - - - 1320 - - {{164, 16}, {20, 20}} - - - 1 - 501 - NO - IBCocoaTouchFramework - - - - - 1320 - - {{212, 16}, {20, 20}} - - - 1 - 502 - NO - IBCocoaTouchFramework - - - - - 1320 - - {{260, 16}, {20, 20}} - - - 1 - 503 - NO - IBCocoaTouchFramework - - - - - 1316 - {{121, 36}, {10, 10}} - - - _NS:9 - NO - YES - 7 - 400 - NO - IBCocoaTouchFramework - 1 - - 2 - MC42NTQ5MDE5ODE0IDAuNjU4ODIzNTQ5NyAwLjY1ODgyMzU0OTcAA - - - 0 - 1 - - 1 - 8 - - - Helvetica - 8 - 16 - - NO - - - - 1316 - {{42, 43}, {34, 10}} - - - _NS:9 - NO - YES - 7 - 400 - NO - IBCocoaTouchFramework - CYCLE - - 1 - MC40MDA2ODc4Mzk3IDAuNDAwNjg3ODM5NyAwLjQwMDY4NzgzOTcAA - - - 0 - 1 - - Avenir-Black - Avenir - 2 - 8 - - - Avenir-Heavy - 8 - 16 - - NO - - - - 1316 - {{169, 36}, {10, 10}} - - - _NS:9 - NO - YES - 7 - 401 - NO - IBCocoaTouchFramework - 2 - - - 0 - 1 - - - NO - - - - 1316 - {{217, 36}, {10, 10}} - - - _NS:9 - NO - YES - 7 - 402 - NO - IBCocoaTouchFramework - 3 - - - 0 - 1 - - - NO - - - - 1316 - {{265, 36}, {10, 10}} - - _NS:9 - NO - YES - 7 - 403 - NO - IBCocoaTouchFramework - 4 - - - 0 - 1 - - - NO - - - - {320, 60} - - - - 1 - MC43OTgyOTY1OTgyIDAuODA4Mjc1MzA1NyAwLjgwODI3NTMwNTcAA - - IBCocoaTouchFramework - - - - - - - - 0 - - - - - - -1 - - - File's Owner - - - -2 - - - - - 3 - - - - - 11 - 0 - - 11 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 3 - 0 - - 3 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 9 - 0 - - 9 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 6 - 0 - - 6 - 1 - - 40 - - 1000 - - 3 - 9 - 3 - - - - 4 - 0 - - 4 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 3 - 0 - - 3 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 11 - 0 - - 11 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 3 - 0 - - 3 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 9 - 0 - - 9 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 6 - 0 - - 6 - 1 - - 88 - - 1000 - - 3 - 9 - 3 - - - - 4 - 0 - - 4 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 3 - 0 - - 3 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 11 - 0 - - 11 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 3 - 0 - - 3 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 9 - 0 - - 9 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 6 - 0 - - 6 - 1 - - 136 - - 1000 - - 3 - 9 - 3 - - - - 4 - 0 - - 4 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 3 - 0 - - 3 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 4 - 0 - - 4 - 1 - - 14 - - 1000 - - 3 - 9 - 3 - - - - 9 - 0 - - 9 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 3 - 0 - - 3 - 1 - - 16 - - 1000 - - 3 - 9 - 3 - - - - 5 - 0 - - 5 - 1 - - 116 - - 1000 - - 3 - 9 - 3 - - - - 4 - 0 - - 4 - 1 - - 7 - - 1000 - - 3 - 9 - 3 - - - - 5 - 0 - - 5 - 1 - - 42 - - 1000 - - 3 - 9 - 3 - - - - - - - - - - - - - - - 7 - - - - - 10 - - - - - 12 - - - - - 15 - - - - - 7 - 0 - - 0 - 1 - - 20 - - 1000 - - 3 - 9 - 1 - - - - - - 16 - - - - - 7 - 0 - - 0 - 1 - - 20 - - 1000 - - 3 - 9 - 1 - - - - - - 17 - - - - - 7 - 0 - - 0 - 1 - - 20 - - 1000 - - 3 - 9 - 1 - - - - - - 18 - - - - - 8 - 0 - - 0 - 1 - - 20 - - 1000 - - 3 - 9 - 1 - - - - 7 - 0 - - 0 - 1 - - 20 - - 1000 - - 3 - 9 - 1 - - - - - - 26 - - - - - 27 - - - - - 30 - - - - - 33 - - - - - 41 - - - - - 61 - - - - - 8 - 0 - - 0 - 1 - - 10 - - 1000 - - 3 - 9 - 1 - - - - 7 - 0 - - 0 - 1 - - 10 - - 1000 - - 3 - 9 - 1 - - - - - - 86 - - - - - 98 - - - - - 116 - - - - - 7 - 0 - - 0 - 1 - - 10 - - 1000 - - 3 - 9 - 1 - - - - - - 117 - - - - - 130 - - - - - 141 - - - - - 7 - 0 - - 0 - 1 - - 10 - - 1000 - - 3 - 9 - 1 - - - - - - 142 - - - - - 153 - - - - - 162 - - - - - 7 - 0 - - 0 - 1 - - 10 - - 1000 - - 3 - 9 - 1 - - - - - - 163 - - - - - 179 - - - - - 192 - - - - - 193 - - - - - 194 - - - - - 195 - - - - - 196 - - - - - 8 - 0 - - 0 - 1 - - 10 - - 1000 - - 3 - 9 - 1 - - - - 7 - 0 - - 0 - 1 - - 34 - - 1000 - - 3 - 9 - 1 - - - - - - 339 - - - - - 341 - - - - - 344 - - - - - 345 - - - - - 350 - - - - - 352 - - - - - 372 - - - - - 382 - - - - - 389 - - - - - 37 - - - - - 39 - - - - - 35 - - - - - 398 - - - - - 399 - - - - - 400 - - - - - 401 - - - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIResponder - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - 401 - - - 0 - IBCocoaTouchFramework - YES - 3 - - Pomodoro_Off.png - {40, 40} - - YES - 2083 - - diff --git a/PomoTimer/UIImage+ColorAtPixel.h b/PomoTimer/UIImage+ColorAtPixel.h deleted file mode 100755 index bd5c31c..0000000 --- a/PomoTimer/UIImage+ColorAtPixel.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (c) 2009 Ole Begemann - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - */ - -/* - UIImage+ColorAtPixel.h - - Created by Ole Begemann - October, 2009 - */ - -#import - -/* - A category on UIImage that enables you to query the color value of arbitrary - pixels of the image. - */ -@interface UIImage (ColorAtPixel) - -- (UIColor *)colorAtPixel:(CGPoint)point; - -@end diff --git a/PomoTimer/UIImage+ColorAtPixel.m b/PomoTimer/UIImage+ColorAtPixel.m deleted file mode 100755 index 48c8648..0000000 --- a/PomoTimer/UIImage+ColorAtPixel.m +++ /dev/null @@ -1,90 +0,0 @@ -/* - Copyright (c) 2009 Ole Begemann - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - */ - -/* - UIImage+ColorAtPixel.m - - Created by Ole Begemann - October, 2009 - */ - -#import - -#import "UIImage+ColorAtPixel.h" - - -@implementation UIImage (ColorAtPixel) - -/* - Returns the color of the image pixel at point. Returns nil if point lies outside the image bounds. - If the point coordinates contain decimal parts, they will be truncated. - - To get at the pixel data, this method must draw the image into a bitmap context. - For minimal memory usage and optimum performance, only the specific requested - pixel is drawn. - If you need to query pixel colors for the same image repeatedly (e.g., in a loop), - this approach is probably less efficient than drawing the entire image into memory - once and caching it. - */ -- (UIColor *)colorAtPixel:(CGPoint)point { - // Cancel if point is outside image coordinates - if (!CGRectContainsPoint(CGRectMake(0.0f, 0.0f, self.size.width, self.size.height), point)) { - return nil; - } - - - // Create a 1x1 pixel byte array and bitmap context to draw the pixel into. - // Reference: http://stackoverflow.com/questions/1042830/retrieving-a-pixel-alpha-value-for-a-uiimage - NSInteger pointX = trunc(point.x); - NSInteger pointY = trunc(point.y); - CGImageRef cgImage = self.CGImage; - NSUInteger width = self.size.width; - NSUInteger height = self.size.height; - CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); - int bytesPerPixel = 4; - int bytesPerRow = bytesPerPixel * 1; - NSUInteger bitsPerComponent = 8; - unsigned char pixelData[4] = { 0, 0, 0, 0 }; - CGContextRef context = CGBitmapContextCreate(pixelData, - 1, - 1, - bitsPerComponent, - bytesPerRow, - colorSpace, - kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big); - CGColorSpaceRelease(colorSpace); - CGContextSetBlendMode(context, kCGBlendModeCopy); - - // Draw the pixel we are interested in onto the bitmap context - CGContextTranslateCTM(context, -pointX, pointY-(CGFloat)height); - CGContextDrawImage(context, CGRectMake(0.0f, 0.0f, (CGFloat)width, (CGFloat)height), cgImage); - CGContextRelease(context); - - // Convert color values [0..255] to floats [0.0..1.0] - CGFloat red = (CGFloat)pixelData[0] / 255.0f; - CGFloat green = (CGFloat)pixelData[1] / 255.0f; - CGFloat blue = (CGFloat)pixelData[2] / 255.0f; - CGFloat alpha = (CGFloat)pixelData[3] / 255.0f; - return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; -} - -@end diff --git a/PomoTimer/UIViewController+Storyboard.h b/PomoTimer/UIViewController+Storyboard.h deleted file mode 100644 index 7477d30..0000000 --- a/PomoTimer/UIViewController+Storyboard.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// UIViewController+Dismiss.h -// StoryBoard -// -// Created by lingostar on 10/2/12. -// Copyright (c) 2012 lingostar. All rights reserved. -// - -#import - -@interface UIViewController(UIViewController_Storyboard) -- (IBAction)navigationBackToRoot:(id)sender; - -- (IBAction)exit:(UIStoryboardSegue *)segue; -- (IBAction)dismissPush:(UIStoryboardSegue *)segue; -- (IBAction)dismiss:(id)sender; - -@end diff --git a/PomoTimer/UIViewController+Storyboard.m b/PomoTimer/UIViewController+Storyboard.m deleted file mode 100644 index 8ebb9e1..0000000 --- a/PomoTimer/UIViewController+Storyboard.m +++ /dev/null @@ -1,51 +0,0 @@ -// -// UIViewController+Dismiss.m -// StoryBoard -// -// Created by lingostar on 10/2/12. -// Copyright (c) 2012 lingostar. All rights reserved. -// - -#import "UIViewController+Storyboard.h" - -@implementation UIViewController(UIViewController_Storyboard) - -- (IBAction)navigationBackToRoot:(id)sender -{ - UINavigationController *navController = self.navigationController; - [navController popToRootViewControllerAnimated:YES]; -} - -- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event -{ - for (UIView *view in self.view.subviews) { - [view resignFirstResponder]; - } - -} - - -- (IBAction)exit:(UIStoryboardSegue *)segue -{ - -} - -- (IBAction)dismissPush:(UIStoryboardSegue *)segue -{ - UIViewController *destVC = segue.destinationViewController; - - dispatch_async(dispatch_get_main_queue(), - ^{[destVC performSegueWithIdentifier:@"ModalDismissPush" sender:nil];} - ); -} - -- (IBAction)dismiss:(id)sender; -{ - [self dismissViewControllerAnimated:YES completion:nil]; -} - - - - - -@end diff --git a/PomoTimer/btn@2x.png b/PomoTimer/btn@2x.png new file mode 100644 index 0000000..383d114 Binary files /dev/null and b/PomoTimer/btn@2x.png differ diff --git a/PomoTimer/button_history@2x.png b/PomoTimer/button_history@2x.png deleted file mode 100644 index fb34580..0000000 Binary files a/PomoTimer/button_history@2x.png and /dev/null differ diff --git a/PomoTimer/button_reset@2x.png b/PomoTimer/button_reset@2x.png deleted file mode 100644 index a6c0083..0000000 Binary files a/PomoTimer/button_reset@2x.png and /dev/null differ diff --git a/PomoTimer/button_reset_enable@2x.png b/PomoTimer/button_reset_enable@2x.png deleted file mode 100644 index d600b08..0000000 Binary files a/PomoTimer/button_reset_enable@2x.png and /dev/null differ diff --git a/PomoTimer/button_todo@2x.png b/PomoTimer/button_todo@2x.png deleted file mode 100644 index 18a99c3..0000000 Binary files a/PomoTimer/button_todo@2x.png and /dev/null differ diff --git a/PomoTimer/cycle_0.png b/PomoTimer/cycle_0.png deleted file mode 100644 index 3a566f5..0000000 Binary files a/PomoTimer/cycle_0.png and /dev/null differ diff --git a/PomoTimer/cycle_1.png b/PomoTimer/cycle_1.png deleted file mode 100644 index 3fa9b3f..0000000 Binary files a/PomoTimer/cycle_1.png and /dev/null differ diff --git a/PomoTimer/cycle_2.png b/PomoTimer/cycle_2.png deleted file mode 100644 index 3c4575d..0000000 Binary files a/PomoTimer/cycle_2.png and /dev/null differ diff --git a/PomoTimer/cycle_3.png b/PomoTimer/cycle_3.png deleted file mode 100644 index 75a6c1f..0000000 Binary files a/PomoTimer/cycle_3.png and /dev/null differ diff --git a/PomoTimer/cycle_4.png b/PomoTimer/cycle_4.png deleted file mode 100644 index fc80926..0000000 Binary files a/PomoTimer/cycle_4.png and /dev/null differ diff --git a/PomoTimer/cycle_5.png b/PomoTimer/cycle_5.png deleted file mode 100644 index 6cc069f..0000000 Binary files a/PomoTimer/cycle_5.png and /dev/null differ diff --git a/PomoTimer/cycle_6.png b/PomoTimer/cycle_6.png deleted file mode 100644 index 418282b..0000000 Binary files a/PomoTimer/cycle_6.png and /dev/null differ diff --git a/PomoTimer/cycle_7.png b/PomoTimer/cycle_7.png deleted file mode 100644 index 34bfeae..0000000 Binary files a/PomoTimer/cycle_7.png and /dev/null differ diff --git a/PomoTimer/cycle_8.png b/PomoTimer/cycle_8.png deleted file mode 100644 index aaf0b3e..0000000 Binary files a/PomoTimer/cycle_8.png and /dev/null differ diff --git a/PomoTimer/cycle_9.png b/PomoTimer/cycle_9.png deleted file mode 100644 index f9d3561..0000000 Binary files a/PomoTimer/cycle_9.png and /dev/null differ diff --git a/PomoTimer/point_black@2x.png b/PomoTimer/naviBar.png similarity index 61% rename from PomoTimer/point_black@2x.png rename to PomoTimer/naviBar.png index ca51fba..65a36a1 100644 Binary files a/PomoTimer/point_black@2x.png and b/PomoTimer/naviBar.png differ diff --git a/PomoTimer/num_0.png b/PomoTimer/num_0.png deleted file mode 100644 index 31f6114..0000000 Binary files a/PomoTimer/num_0.png and /dev/null differ diff --git a/PomoTimer/num_1.png b/PomoTimer/num_1.png deleted file mode 100644 index 697f05a..0000000 Binary files a/PomoTimer/num_1.png and /dev/null differ diff --git a/PomoTimer/num_2.png b/PomoTimer/num_2.png deleted file mode 100644 index 9a6b8fb..0000000 Binary files a/PomoTimer/num_2.png and /dev/null differ diff --git a/PomoTimer/num_3.png b/PomoTimer/num_3.png deleted file mode 100644 index dd34999..0000000 Binary files a/PomoTimer/num_3.png and /dev/null differ diff --git a/PomoTimer/num_4.png b/PomoTimer/num_4.png deleted file mode 100644 index c4ab93c..0000000 Binary files a/PomoTimer/num_4.png and /dev/null differ diff --git a/PomoTimer/num_5.png b/PomoTimer/num_5.png deleted file mode 100644 index 72af9fd..0000000 Binary files a/PomoTimer/num_5.png and /dev/null differ diff --git a/PomoTimer/num_6.png b/PomoTimer/num_6.png deleted file mode 100644 index 6e99ea7..0000000 Binary files a/PomoTimer/num_6.png and /dev/null differ diff --git a/PomoTimer/num_7.png b/PomoTimer/num_7.png deleted file mode 100644 index 0536d8e..0000000 Binary files a/PomoTimer/num_7.png and /dev/null differ diff --git a/PomoTimer/num_8.png b/PomoTimer/num_8.png deleted file mode 100644 index f6ad24e..0000000 Binary files a/PomoTimer/num_8.png and /dev/null differ diff --git a/PomoTimer/num_9.png b/PomoTimer/num_9.png deleted file mode 100644 index b91302b..0000000 Binary files a/PomoTimer/num_9.png and /dev/null differ diff --git a/PomoTimer/num_shadow.png b/PomoTimer/num_shadow.png deleted file mode 100644 index 40519a7..0000000 Binary files a/PomoTimer/num_shadow.png and /dev/null differ diff --git a/PomoTimer/panel_default@2x.png b/PomoTimer/panel_default@2x.png deleted file mode 100644 index 77f1e62..0000000 Binary files a/PomoTimer/panel_default@2x.png and /dev/null differ diff --git a/PomoTimer/panel_pomo_pause@2x.png b/PomoTimer/panel_pomo_pause@2x.png deleted file mode 100644 index b43957c..0000000 Binary files a/PomoTimer/panel_pomo_pause@2x.png and /dev/null differ diff --git a/PomoTimer/panel_recess@2x.png b/PomoTimer/panel_recess@2x.png deleted file mode 100644 index b5fab45..0000000 Binary files a/PomoTimer/panel_recess@2x.png and /dev/null differ diff --git a/PomoTimer/point_red@2x.png b/PomoTimer/point_red@2x.png deleted file mode 100644 index 21d665e..0000000 Binary files a/PomoTimer/point_red@2x.png and /dev/null differ diff --git a/PomoTimer/status_pause@2x.png b/PomoTimer/status_pause@2x.png deleted file mode 100644 index 467831e..0000000 Binary files a/PomoTimer/status_pause@2x.png and /dev/null differ diff --git a/PomoTimer/status_play@2x.png b/PomoTimer/status_play@2x.png deleted file mode 100644 index 509066b..0000000 Binary files a/PomoTimer/status_play@2x.png and /dev/null differ diff --git a/PomoTimerUnitTest/LSPomoCycleTest.h b/PomoTimerUnitTest/LSPomoCycleTest.h deleted file mode 100644 index d72a5ae..0000000 --- a/PomoTimerUnitTest/LSPomoCycleTest.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// LSPomoCycleTest.h -// PomoTimer -// -// Created by Lingostar on 13. 7. 9.. -// Copyright (c) 2013년 Lingostar. All rights reserved. -// - -#import - -@interface LSPomoCycleTest : SenTestCase - -@end diff --git a/PomoTimerUnitTest/LSPomoCycleTest.m b/PomoTimerUnitTest/LSPomoCycleTest.m deleted file mode 100644 index e908419..0000000 --- a/PomoTimerUnitTest/LSPomoCycleTest.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// LSPomoCycleTest.m -// PomoTimer -// -// Created by Lingostar on 13. 7. 9.. -// Copyright (c) 2013년 Lingostar. All rights reserved. -// - -#import "LSPomoCycleTest.h" - -@implementation LSPomoCycleTest - -@end diff --git a/PomoTimerUnitTest/LSPomoTaskTest.h b/PomoTimerUnitTest/LSPomoTaskTest.h deleted file mode 100644 index 8e3f575..0000000 --- a/PomoTimerUnitTest/LSPomoTaskTest.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// LSPomoTaskTest.h -// PomoTimer -// -// Created by Lingostar on 13. 7. 9.. -// Copyright (c) 2013년 Lingostar. All rights reserved. -// - -#import - -@interface LSPomoTaskTest : SenTestCase - -@end diff --git a/PomoTimerUnitTest/LSPomoTaskTest.m b/PomoTimerUnitTest/LSPomoTaskTest.m deleted file mode 100644 index 53ddf74..0000000 --- a/PomoTimerUnitTest/LSPomoTaskTest.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// LSPomoTaskTest.m -// PomoTimer -// -// Created by Lingostar on 13. 7. 9.. -// Copyright (c) 2013년 Lingostar. All rights reserved. -// - -#import "LSPomoTaskTest.h" - -@implementation LSPomoTaskTest - -@end diff --git a/PomoTimerUnitTest/PomoTimerUnitTest-Info.plist b/PomoTimerUnitTest/PomoTimerUnitTest-Info.plist deleted file mode 100644 index 2fe1ad4..0000000 --- a/PomoTimerUnitTest/PomoTimerUnitTest-Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - kr.co.lingostar.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/PomoTimerUnitTest/PomoTimerUnitTest-Prefix.pch b/PomoTimerUnitTest/PomoTimerUnitTest-Prefix.pch deleted file mode 100644 index 68ae8c8..0000000 --- a/PomoTimerUnitTest/PomoTimerUnitTest-Prefix.pch +++ /dev/null @@ -1,8 +0,0 @@ -// -// Prefix header for all source files of the 'PomoTimerUnitTest' target in the 'PomoTimerUnitTest' project -// - -#ifdef __OBJC__ - #import - #import -#endif diff --git a/PomoTimerUnitTest/PomoTimerUnitTest.h b/PomoTimerUnitTest/PomoTimerUnitTest.h deleted file mode 100644 index 4305597..0000000 --- a/PomoTimerUnitTest/PomoTimerUnitTest.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// PomoTimerUnitTest.h -// PomoTimerUnitTest -// -// Created by Lingostar on 13. 7. 9.. -// Copyright (c) 2013년 Lingostar. All rights reserved. -// - -#import - -@interface PomoTimerUnitTest : SenTestCase - -@end diff --git a/PomoTimerUnitTest/PomoTimerUnitTest.m b/PomoTimerUnitTest/PomoTimerUnitTest.m deleted file mode 100644 index c4bad49..0000000 --- a/PomoTimerUnitTest/PomoTimerUnitTest.m +++ /dev/null @@ -1,32 +0,0 @@ -// -// PomoTimerUnitTest.m -// PomoTimerUnitTest -// -// Created by Lingostar on 13. 7. 9.. -// Copyright (c) 2013년 Lingostar. All rights reserved. -// - -#import "PomoTimerUnitTest.h" - -@implementation PomoTimerUnitTest - -- (void)setUp -{ - [super setUp]; - - // Set-up code here. -} - -- (void)tearDown -{ - // Tear-down code here. - - [super tearDown]; -} - -- (void)testExample -{ - STFail(@"Unit tests are not implemented yet in PomoTimerUnitTest"); -} - -@end diff --git a/PomoTimerUnitTest/en.lproj/InfoPlist.strings b/PomoTimerUnitTest/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28f..0000000 --- a/PomoTimerUnitTest/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/icon_114_114.png b/icon_114_114.png deleted file mode 100644 index 5870254..0000000 Binary files a/icon_114_114.png and /dev/null differ diff --git a/icon_57_57.png b/icon_57_57.png deleted file mode 100644 index 584b818..0000000 Binary files a/icon_57_57.png and /dev/null differ