diff --git a/ChessTimer.xcodeproj/project.pbxproj b/ChessTimer.xcodeproj/project.pbxproj index 6e3538f..0977a63 100644 --- a/ChessTimer.xcodeproj/project.pbxproj +++ b/ChessTimer.xcodeproj/project.pbxproj @@ -7,13 +7,22 @@ objects = { /* Begin PBXBuildFile section */ + D81FF973189AC06C00214FD2 /* 66805786d5.png in Resources */ = {isa = PBXBuildFile; fileRef = D81FF972189AC06B00214FD2 /* 66805786d5.png */; }; + D81FF975189AC1A800214FD2 /* Twitter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D81FF974189AC1A800214FD2 /* Twitter.framework */; }; + D844267A188071020028218E /* SettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D8442679188071020028218E /* SettingsViewController.m */; }; + D8905B08187EAE0B00CE4B9C /* Grey Circle.png in Resources */ = {isa = PBXBuildFile; fileRef = D8905B00187EAE0B00CE4B9C /* Grey Circle.png */; }; + D8905B0A187EAE0B00CE4B9C /* PauseButton.png in Resources */ = {isa = PBXBuildFile; fileRef = D8905B02187EAE0B00CE4B9C /* PauseButton.png */; }; + D8905B0B187EAE0B00CE4B9C /* PlayButton.png in Resources */ = {isa = PBXBuildFile; fileRef = D8905B03187EAE0B00CE4B9C /* PlayButton.png */; }; + D8905B0C187EAE0B00CE4B9C /* ResetIcon.png in Resources */ = {isa = PBXBuildFile; fileRef = D8905B04187EAE0B00CE4B9C /* ResetIcon.png */; }; + D8905B0E187EAE0B00CE4B9C /* SettingsIcon.png in Resources */ = {isa = PBXBuildFile; fileRef = D8905B06187EAE0B00CE4B9C /* SettingsIcon.png */; }; + D8905B0F187EAE0B00CE4B9C /* SettingsThinIcon.png in Resources */ = {isa = PBXBuildFile; fileRef = D8905B07187EAE0B00CE4B9C /* SettingsThinIcon.png */; }; + D8905B13187EAE7200CE4B9C /* turnOver.aiff in Resources */ = {isa = PBXBuildFile; fileRef = D8905B12187EAE7200CE4B9C /* turnOver.aiff */; }; D8A190FE187EAA3A000E9BA5 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D8A190FD187EAA3A000E9BA5 /* Foundation.framework */; }; D8A19100187EAA3A000E9BA5 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D8A190FF187EAA3A000E9BA5 /* CoreGraphics.framework */; }; D8A19102187EAA3A000E9BA5 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D8A19101187EAA3A000E9BA5 /* UIKit.framework */; }; D8A19108187EAA3A000E9BA5 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D8A19106187EAA3A000E9BA5 /* InfoPlist.strings */; }; D8A1910A187EAA3A000E9BA5 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D8A19109187EAA3A000E9BA5 /* main.m */; }; D8A1910E187EAA3A000E9BA5 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D8A1910D187EAA3A000E9BA5 /* AppDelegate.m */; }; - D8A19111187EAA3A000E9BA5 /* Main_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D8A1910F187EAA3A000E9BA5 /* Main_iPhone.storyboard */; }; D8A19114187EAA3A000E9BA5 /* Main_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D8A19112187EAA3A000E9BA5 /* Main_iPad.storyboard */; }; D8A19117187EAA3A000E9BA5 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D8A19116187EAA3A000E9BA5 /* ViewController.m */; }; D8A19119187EAA3A000E9BA5 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D8A19118187EAA3A000E9BA5 /* Images.xcassets */; }; @@ -22,6 +31,10 @@ D8A19122187EAA3A000E9BA5 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D8A19101187EAA3A000E9BA5 /* UIKit.framework */; }; D8A1912A187EAA3A000E9BA5 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D8A19128187EAA3A000E9BA5 /* InfoPlist.strings */; }; D8A1912C187EAA3A000E9BA5 /* ChessTimerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D8A1912B187EAA3A000E9BA5 /* ChessTimerTests.m */; }; + D8A1913A187EAAA6000E9BA5 /* Main_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D8A19138187EAAA6000E9BA5 /* Main_iPhone.storyboard */; }; + D8A1914A187EAB42000E9BA5 /* Highscore1.png in Resources */ = {isa = PBXBuildFile; fileRef = D8A19142187EAB42000E9BA5 /* Highscore1.png */; }; + D8AC1ED5188562FD00FC428A /* dingSFX1.aiff in Resources */ = {isa = PBXBuildFile; fileRef = D8AC1ED4188562FD00FC428A /* dingSFX1.aiff */; }; + D8C7E4E41882000500F562FA /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D8C7E4E31882000500F562FA /* AudioToolbox.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -35,6 +48,17 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + D81FF972189AC06B00214FD2 /* 66805786d5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = 66805786d5.png; path = ../../../../../Downloads/66805786d5.png; sourceTree = ""; }; + D81FF974189AC1A800214FD2 /* Twitter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Twitter.framework; path = System/Library/Frameworks/Twitter.framework; sourceTree = SDKROOT; }; + D8442678188071020028218E /* SettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SettingsViewController.h; sourceTree = ""; }; + D8442679188071020028218E /* SettingsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SettingsViewController.m; sourceTree = ""; }; + D8905B00187EAE0B00CE4B9C /* Grey Circle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Grey Circle.png"; path = "Images/Grey Circle.png"; sourceTree = SOURCE_ROOT; }; + D8905B02187EAE0B00CE4B9C /* PauseButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PauseButton.png; path = Images/PauseButton.png; sourceTree = SOURCE_ROOT; }; + D8905B03187EAE0B00CE4B9C /* PlayButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PlayButton.png; path = Images/PlayButton.png; sourceTree = SOURCE_ROOT; }; + D8905B04187EAE0B00CE4B9C /* ResetIcon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ResetIcon.png; path = Images/ResetIcon.png; sourceTree = SOURCE_ROOT; }; + D8905B06187EAE0B00CE4B9C /* SettingsIcon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = SettingsIcon.png; path = Images/SettingsIcon.png; sourceTree = SOURCE_ROOT; }; + D8905B07187EAE0B00CE4B9C /* SettingsThinIcon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = SettingsThinIcon.png; path = Images/SettingsThinIcon.png; sourceTree = SOURCE_ROOT; }; + D8905B12187EAE7200CE4B9C /* turnOver.aiff */ = {isa = PBXFileReference; lastKnownFileType = audio.aiff; name = turnOver.aiff; path = SoundFiles/turnOver.aiff; sourceTree = SOURCE_ROOT; }; D8A190FA187EAA3A000E9BA5 /* ChessTimer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ChessTimer.app; sourceTree = BUILT_PRODUCTS_DIR; }; D8A190FD187EAA3A000E9BA5 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; D8A190FF187EAA3A000E9BA5 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; @@ -45,7 +69,6 @@ D8A1910B187EAA3A000E9BA5 /* ChessTimer-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ChessTimer-Prefix.pch"; sourceTree = ""; }; D8A1910C187EAA3A000E9BA5 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; D8A1910D187EAA3A000E9BA5 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - D8A19110187EAA3A000E9BA5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPhone.storyboard; sourceTree = ""; }; D8A19113187EAA3A000E9BA5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPad.storyboard; sourceTree = ""; }; D8A19115187EAA3A000E9BA5 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; D8A19116187EAA3A000E9BA5 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; @@ -55,6 +78,10 @@ D8A19127187EAA3A000E9BA5 /* ChessTimerTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ChessTimerTests-Info.plist"; sourceTree = ""; }; D8A19129187EAA3A000E9BA5 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; D8A1912B187EAA3A000E9BA5 /* ChessTimerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ChessTimerTests.m; sourceTree = ""; }; + D8A19139187EAAA6000E9BA5 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = ../../mhl_AlertTimer/mhl_AlertTimer/en.lproj/Main_iPhone.storyboard; sourceTree = ""; }; + D8A19142187EAB42000E9BA5 /* Highscore1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Highscore1.png; path = ../../mhl_AlertTimer/mhl_AlertTimer/Highscore1.png; sourceTree = ""; }; + D8AC1ED4188562FD00FC428A /* dingSFX1.aiff */ = {isa = PBXFileReference; lastKnownFileType = audio.aiff; name = dingSFX1.aiff; path = SoundFiles/dingSFX1.aiff; sourceTree = SOURCE_ROOT; }; + D8C7E4E31882000500F562FA /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -62,6 +89,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + D81FF975189AC1A800214FD2 /* Twitter.framework in Frameworks */, + D8C7E4E41882000500F562FA /* AudioToolbox.framework in Frameworks */, D8A19100187EAA3A000E9BA5 /* CoreGraphics.framework in Frameworks */, D8A19102187EAA3A000E9BA5 /* UIKit.framework in Frameworks */, D8A190FE187EAA3A000E9BA5 /* Foundation.framework in Frameworks */, @@ -103,6 +132,8 @@ D8A190FC187EAA3A000E9BA5 /* Frameworks */ = { isa = PBXGroup; children = ( + D81FF974189AC1A800214FD2 /* Twitter.framework */, + D8C7E4E31882000500F562FA /* AudioToolbox.framework */, D8A190FD187EAA3A000E9BA5 /* Foundation.framework */, D8A190FF187EAA3A000E9BA5 /* CoreGraphics.framework */, D8A19101187EAA3A000E9BA5 /* UIKit.framework */, @@ -116,10 +147,12 @@ children = ( D8A1910C187EAA3A000E9BA5 /* AppDelegate.h */, D8A1910D187EAA3A000E9BA5 /* AppDelegate.m */, - D8A1910F187EAA3A000E9BA5 /* Main_iPhone.storyboard */, + D8A19138187EAAA6000E9BA5 /* Main_iPhone.storyboard */, D8A19112187EAA3A000E9BA5 /* Main_iPad.storyboard */, D8A19115187EAA3A000E9BA5 /* ViewController.h */, D8A19116187EAA3A000E9BA5 /* ViewController.m */, + D8442678188071020028218E /* SettingsViewController.h */, + D8442679188071020028218E /* SettingsViewController.m */, D8A19118187EAA3A000E9BA5 /* Images.xcassets */, D8A19104187EAA3A000E9BA5 /* Supporting Files */, ); @@ -129,6 +162,8 @@ D8A19104187EAA3A000E9BA5 /* Supporting Files */ = { isa = PBXGroup; children = ( + D8A1914B187EAB47000E9BA5 /* Images */, + D8A1914E187EAB54000E9BA5 /* Sounds */, D8A19105187EAA3A000E9BA5 /* ChessTimer-Info.plist */, D8A19106187EAA3A000E9BA5 /* InfoPlist.strings */, D8A19109187EAA3A000E9BA5 /* main.m */, @@ -155,6 +190,30 @@ name = "Supporting Files"; sourceTree = ""; }; + D8A1914B187EAB47000E9BA5 /* Images */ = { + isa = PBXGroup; + children = ( + D81FF972189AC06B00214FD2 /* 66805786d5.png */, + D8905B00187EAE0B00CE4B9C /* Grey Circle.png */, + D8905B03187EAE0B00CE4B9C /* PlayButton.png */, + D8905B02187EAE0B00CE4B9C /* PauseButton.png */, + D8905B04187EAE0B00CE4B9C /* ResetIcon.png */, + D8905B06187EAE0B00CE4B9C /* SettingsIcon.png */, + D8905B07187EAE0B00CE4B9C /* SettingsThinIcon.png */, + D8A19142187EAB42000E9BA5 /* Highscore1.png */, + ); + name = Images; + sourceTree = ""; + }; + D8A1914E187EAB54000E9BA5 /* Sounds */ = { + isa = PBXGroup; + children = ( + D8905B12187EAE7200CE4B9C /* turnOver.aiff */, + D8AC1ED4188562FD00FC428A /* dingSFX1.aiff */, + ); + name = Sounds; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -231,10 +290,20 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + D8A1913A187EAAA6000E9BA5 /* Main_iPhone.storyboard in Resources */, D8A19114187EAA3A000E9BA5 /* Main_iPad.storyboard in Resources */, + D8905B0E187EAE0B00CE4B9C /* SettingsIcon.png in Resources */, D8A19119187EAA3A000E9BA5 /* Images.xcassets in Resources */, - D8A19111187EAA3A000E9BA5 /* Main_iPhone.storyboard in Resources */, + D8905B08187EAE0B00CE4B9C /* Grey Circle.png in Resources */, D8A19108187EAA3A000E9BA5 /* InfoPlist.strings in Resources */, + D8905B13187EAE7200CE4B9C /* turnOver.aiff in Resources */, + D8A1914A187EAB42000E9BA5 /* Highscore1.png in Resources */, + D8905B0C187EAE0B00CE4B9C /* ResetIcon.png in Resources */, + D8905B0A187EAE0B00CE4B9C /* PauseButton.png in Resources */, + D81FF973189AC06C00214FD2 /* 66805786d5.png in Resources */, + D8905B0F187EAE0B00CE4B9C /* SettingsThinIcon.png in Resources */, + D8905B0B187EAE0B00CE4B9C /* PlayButton.png in Resources */, + D8AC1ED5188562FD00FC428A /* dingSFX1.aiff in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -255,6 +324,7 @@ files = ( D8A19117187EAA3A000E9BA5 /* ViewController.m in Sources */, D8A1910E187EAA3A000E9BA5 /* AppDelegate.m in Sources */, + D844267A188071020028218E /* SettingsViewController.m in Sources */, D8A1910A187EAA3A000E9BA5 /* main.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -286,14 +356,6 @@ name = InfoPlist.strings; sourceTree = ""; }; - D8A1910F187EAA3A000E9BA5 /* Main_iPhone.storyboard */ = { - isa = PBXVariantGroup; - children = ( - D8A19110187EAA3A000E9BA5 /* Base */, - ); - name = Main_iPhone.storyboard; - sourceTree = ""; - }; D8A19112187EAA3A000E9BA5 /* Main_iPad.storyboard */ = { isa = PBXVariantGroup; children = ( @@ -310,6 +372,14 @@ name = InfoPlist.strings; sourceTree = ""; }; + D8A19138187EAAA6000E9BA5 /* Main_iPhone.storyboard */ = { + isa = PBXVariantGroup; + children = ( + D8A19139187EAAA6000E9BA5 /* en */, + ); + name = Main_iPhone.storyboard; + sourceTree = ""; + }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ @@ -396,6 +466,7 @@ GCC_PREFIX_HEADER = "ChessTimer/ChessTimer-Prefix.pch"; INFOPLIST_FILE = "ChessTimer/ChessTimer-Info.plist"; PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = 1; WRAPPER_EXTENSION = app; }; name = Debug; @@ -409,6 +480,7 @@ GCC_PREFIX_HEADER = "ChessTimer/ChessTimer-Prefix.pch"; INFOPLIST_FILE = "ChessTimer/ChessTimer-Info.plist"; PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = 1; WRAPPER_EXTENSION = app; }; name = Release; @@ -474,6 +546,7 @@ D8A19131187EAA3A000E9BA5 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; D8A19132187EAA3A000E9BA5 /* Build configuration list for PBXNativeTarget "ChessTimerTests" */ = { isa = XCConfigurationList; @@ -482,6 +555,7 @@ D8A19134187EAA3A000E9BA5 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; diff --git a/ChessTimer/ChessTimer-Info.plist b/ChessTimer/ChessTimer-Info.plist index 6d90afd..9c19c3a 100644 --- a/ChessTimer/ChessTimer-Info.plist +++ b/ChessTimer/ChessTimer-Info.plist @@ -32,11 +32,11 @@ armv7 + UIStatusBarHidden + UISupportedInterfaceOrientations UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight UISupportedInterfaceOrientations~ipad @@ -45,5 +45,7 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + UIViewControllerBasedStatusBarAppearance + diff --git a/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon29x29-1.png b/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon29x29-1.png new file mode 100644 index 0000000..039a9f2 Binary files /dev/null and b/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon29x29-1.png differ diff --git a/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon29x29.png b/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon29x29.png new file mode 100644 index 0000000..5253337 Binary files /dev/null and b/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon29x29.png differ diff --git a/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon29x29@2x-1.png b/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon29x29@2x-1.png new file mode 100644 index 0000000..92ab98b Binary files /dev/null and b/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon29x29@2x-1.png differ diff --git a/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon29x29@2x.png b/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon29x29@2x.png new file mode 100644 index 0000000..92ab98b Binary files /dev/null and b/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon29x29@2x.png differ diff --git a/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon40x40.png b/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon40x40.png new file mode 100644 index 0000000..ff34750 Binary files /dev/null and b/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon40x40.png differ diff --git a/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon40x40@2x-1.png b/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon40x40@2x-1.png new file mode 100644 index 0000000..4fc5c1b Binary files /dev/null and b/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon40x40@2x-1.png differ diff --git a/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon40x40@2x.png b/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon40x40@2x.png new file mode 100644 index 0000000..4fc5c1b Binary files /dev/null and b/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon40x40@2x.png differ diff --git a/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon60x60@2x.png b/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon60x60@2x.png new file mode 100644 index 0000000..94048ab Binary files /dev/null and b/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon60x60@2x.png differ diff --git a/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon76x76.png b/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon76x76.png new file mode 100644 index 0000000..6452748 Binary files /dev/null and b/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon76x76.png differ diff --git a/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon76x76@2x.png b/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon76x76@2x.png new file mode 100644 index 0000000..169a249 Binary files /dev/null and b/ChessTimer/Images.xcassets/AppIcon.appiconset/AppIcon76x76@2x.png differ diff --git a/ChessTimer/Images.xcassets/AppIcon.appiconset/Contents.json b/ChessTimer/Images.xcassets/AppIcon.appiconset/Contents.json index 91bf9c1..8df6b89 100644 --- a/ChessTimer/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/ChessTimer/Images.xcassets/AppIcon.appiconset/Contents.json @@ -1,48 +1,63 @@ { "images" : [ { - "idiom" : "iphone", "size" : "29x29", + "idiom" : "iphone", + "filename" : "AppIcon29x29-1.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "AppIcon29x29@2x-1.png", "scale" : "2x" }, { - "idiom" : "iphone", "size" : "40x40", + "idiom" : "iphone", + "filename" : "AppIcon40x40@2x-1.png", "scale" : "2x" }, { - "idiom" : "iphone", "size" : "60x60", + "idiom" : "iphone", + "filename" : "AppIcon60x60@2x.png", "scale" : "2x" }, { - "idiom" : "ipad", "size" : "29x29", + "idiom" : "ipad", + "filename" : "AppIcon29x29.png", "scale" : "1x" }, { - "idiom" : "ipad", "size" : "29x29", + "idiom" : "ipad", + "filename" : "AppIcon29x29@2x.png", "scale" : "2x" }, { - "idiom" : "ipad", "size" : "40x40", + "idiom" : "ipad", + "filename" : "AppIcon40x40.png", "scale" : "1x" }, { - "idiom" : "ipad", "size" : "40x40", + "idiom" : "ipad", + "filename" : "AppIcon40x40@2x.png", "scale" : "2x" }, { - "idiom" : "ipad", "size" : "76x76", + "idiom" : "ipad", + "filename" : "AppIcon76x76.png", "scale" : "1x" }, { - "idiom" : "ipad", "size" : "76x76", + "idiom" : "ipad", + "filename" : "AppIcon76x76@2x.png", "scale" : "2x" } ], diff --git a/ChessTimer/Images.xcassets/LaunchImage.launchimage/Contents.json b/ChessTimer/Images.xcassets/LaunchImage.launchimage/Contents.json index 6f870a4..39d3087 100644 --- a/ChessTimer/Images.xcassets/LaunchImage.launchimage/Contents.json +++ b/ChessTimer/Images.xcassets/LaunchImage.launchimage/Contents.json @@ -5,14 +5,16 @@ "idiom" : "iphone", "extent" : "full-screen", "minimum-system-version" : "7.0", + "filename" : "LaunchImage960Idea1.png", "scale" : "2x" }, { - "orientation" : "portrait", + "extent" : "full-screen", "idiom" : "iphone", "subtype" : "retina4", - "extent" : "full-screen", + "filename" : "LaunchImageIdea1-1.png", "minimum-system-version" : "7.0", + "orientation" : "portrait", "scale" : "2x" }, { diff --git a/ChessTimer/Images.xcassets/LaunchImage.launchimage/LaunchImage960Idea1.png b/ChessTimer/Images.xcassets/LaunchImage.launchimage/LaunchImage960Idea1.png new file mode 100644 index 0000000..c9db08b Binary files /dev/null and b/ChessTimer/Images.xcassets/LaunchImage.launchimage/LaunchImage960Idea1.png differ diff --git a/ChessTimer/Images.xcassets/LaunchImage.launchimage/LaunchImageIdea1-1.png b/ChessTimer/Images.xcassets/LaunchImage.launchimage/LaunchImageIdea1-1.png new file mode 100644 index 0000000..c6638a7 Binary files /dev/null and b/ChessTimer/Images.xcassets/LaunchImage.launchimage/LaunchImageIdea1-1.png differ diff --git a/ChessTimer/SettingsViewController.h b/ChessTimer/SettingsViewController.h new file mode 100644 index 0000000..0f63e06 --- /dev/null +++ b/ChessTimer/SettingsViewController.h @@ -0,0 +1,29 @@ +// +// SettingsViewController.h +// ChessTimer +// +// Created by Kevin Midboe on 10/01/14. +// Copyright (c) 2014 KevinMidboe. All rights reserved. +// + +#import +#import "ViewController.h" + +@interface SettingsViewController : UIViewController + +{ + ViewController *ViewControllerData; + IBOutlet UITextField *textfield; + IBOutlet UILabel *resultLabel; +} + +@property (weak, nonatomic) IBOutlet UIPickerView *picker; +@property (strong, nonatomic) NSArray *minutes; +@property (strong, nonatomic) NSArray *minuteValues; + +@property (nonatomic, retain)ViewController*ViewControllerData; + +- (IBAction)tweetShare:(id)sender; +- (IBAction)dismissSettings:(id)sender; + +@end diff --git a/ChessTimer/SettingsViewController.m b/ChessTimer/SettingsViewController.m new file mode 100644 index 0000000..086662f --- /dev/null +++ b/ChessTimer/SettingsViewController.m @@ -0,0 +1,152 @@ +// +// SettingsViewController.m +// ChessTimer +// +// Created by Kevin Midboe on 10/01/14. +// Copyright (c) 2014 KevinMidboe. All rights reserved. +// + +#import "SettingsViewController.h" +#import "ViewController.h" +#import "Twitter/Twitter.h" + +@interface SettingsViewController () +{ + int value; +} + +@end + +@implementation SettingsViewController +{ + //NSString *minuteDataString; +} +@synthesize ViewControllerData; + +#pragma mark - +#pragma mark PickerView DataSource + +- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView +{ + return 1; +} + +- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component +{ + return _minutes.count; +} + +- (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component +{ + return _minutes[row]; +} + +- (IBAction)tweetShare:(id)sender +{ + if([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]) { + + SLComposeViewController *controller = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter]; + + SLComposeViewControllerCompletionHandler myBlock = ^(SLComposeViewControllerResult result){ + if (result == SLComposeViewControllerResultCancelled) { + + NSLog(@"Cancelled"); + + } else + + { + NSLog(@"Done"); + } + + [controller dismissViewControllerAnimated:YES completion:Nil]; + }; + controller.completionHandler =myBlock; + + //Adding the Text to the facebook post value from iOS + [controller setInitialText:@"Check out this awesome app! #ChessClock "]; + + //Adding the URL to the facebook post value from iOS + + //[controller addURL:[NSURL URLWithString:@"http://www.mobile.safilsunny.com"]]; + + //Adding the Image to the facebook post value from iOS + + //[controller addImage:[UIImage imageNamed:@"fb.png"]]; + + [self presentViewController:controller animated:YES completion:Nil]; + + } + else{ + NSLog(@"UnAvailable"); + } +} + + +- (void)viewDidLoad { + [super viewDidLoad]; + + [self.navigationController setNavigationBarHidden:NO animated:YES]; + + _minutes = @[@"3 minutes", @"5 minutes", @"15 minutes", @"25 minutes", @"30 minutes", @"60 minutes", @"60 minutes or 20 moves", @"120 minutes or 40 moves"]; + + _minuteValues = @[@1800.0f, @3000.0f, @9000.0f, @15000.0f, @18000.0f, @36000.0f, @36000.0f, @72000.0f]; + + [_picker selectRow:3 inComponent:0 animated:YES]; +} + +#pragma mark - +#pragma mark PickerView Delegate +-(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row + inComponent:(NSInteger)component +{ + value = [_minuteValues[row] intValue]; + NSString *output = [NSString stringWithFormat:@"%i",value]; + resultLabel.text = output; +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender +{ + // Get the new view controller using + //[segue destinationViewController]. + + // Pass the selected object to the new view controller. +} +*/ + +/*- (IBAction)sendMinuteData:(id)sender +{ + minuteDataString = @"Hello!"; + self.resultLabel.text = self->minuteDataString; + [viewControllerDelegate updateLabel]; +} + +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender +{ + if ([segue.identifier isEqualToString:@"NewViewController"]) + { + ViewController *destViewController = segue.destinationViewController; + destViewController.minuteDataString = minuteDataString; + } +}*/ + +- (IBAction)dismissSettings:(id)sender +{ + ViewController *home = [[ViewController alloc] initWithNibName:nil bundle:nil]; + self.ViewControllerData = home; + ViewControllerData.passedValue = 12; + [self dismissViewControllerAnimated:YES completion:nil]; +} + + + +@end \ No newline at end of file diff --git a/ChessTimer/ViewController.h b/ChessTimer/ViewController.h index ad3eb2f..816f481 100644 --- a/ChessTimer/ViewController.h +++ b/ChessTimer/ViewController.h @@ -7,7 +7,47 @@ // #import +#import @interface ViewController : UIViewController +// +{ + int startTime, defaultTime, timeP1, timeP2, minutes, seconds, milliseconds, resumeControl, count, newTime; + bool started, timeRunout; + + NSTimer *P1Timer, *P2Timer, *updateCheckTimer; + + IBOutlet UILabel *lblTimerP1; + IBOutlet UILabel *lblTimerP2; + + IBOutlet UIButton *startTimerP1; + IBOutlet UIButton *startTimerP2; + IBOutlet UIButton *pauseButton; + IBOutlet UIButton *startButton; + IBOutlet UIImage *imageViewer0; + IBOutlet UIImage *imageViewer1; + + IBOutlet UILabel *label; + NSInteger passedValue; + + SystemSoundID SoundID; +} +@property (nonatomic)NSInteger passedValue; + +- (IBAction)settingsView:(id)sender; + +- (IBAction)startTimerP1; +- (IBAction)startTimerP2; +- (IBAction)displayTimerP1; +- (IBAction)displayTimerP2; + +- (IBAction)pauseButton; +- (IBAction)startButton; +- (IBAction)reset; + @end + + + + diff --git a/ChessTimer/ViewController.m b/ChessTimer/ViewController.m index 4389439..79d0c1d 100644 --- a/ChessTimer/ViewController.m +++ b/ChessTimer/ViewController.m @@ -7,23 +7,280 @@ // #import "ViewController.h" +#import "SettingsViewController.h" @interface ViewController () +{ + +} +//@property (strong, nonatomic) IBOutlet UILabel *minuteLabel; @end @implementation ViewController +@synthesize passedValue; + +- (IBAction)startTimerP1 +{ + [P2Timer invalidate]; + if (started == NO) + { + P2Timer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(displayTimerP2) userInfo:nil repeats:YES]; + AudioServicesPlaySystemSound(SoundID); + lblTimerP2.textColor = [UIColor colorWithRed:255/255.0f green:0/255.0f blue:0/255.0f alpha:1.0f]; + lblTimerP1.textColor = [UIColor colorWithRed:219/255.0f green:219/255.0f blue:219/255.0f alpha:1.0f]; + started = YES; + } + else + if (P1Timer.isValid == false) + { + P1Timer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(displayTimerP1) userInfo:nil repeats:YES]; + AudioServicesPlaySystemSound(SoundID); + lblTimerP1.textColor = [UIColor colorWithRed:255/255.0f green:0/255.0f blue:0/255.0f alpha:1.0f]; + lblTimerP2.textColor = [UIColor colorWithRed:219/255.0f green:219/255.0f blue:219/255.0f alpha:1.0f]; + } +} +- (void)displayTimerP1 +{ + timeP1 -= 0.1; + //Can skip this if want to save CPU. + milliseconds = timeP1; + seconds = milliseconds / 10; + minutes = seconds / 60; + NSString *timerOutput = [NSString stringWithFormat:@"%2d:%02d:%d",minutes % 60, seconds % 60, milliseconds % 10]; + if (timeP1 <= 0 && timeRunout == NO) + { + [P1Timer invalidate]; + UIAlertView *alert = [[UIAlertView alloc] init]; + [alert setTitle:@"Congratulations!"]; + [alert setMessage:@"P1 you are the winner! Type your name below to submit your time and name to the leaderboards."]; + [alert setDelegate:self]; + [alert addButtonWithTitle:@"Cancel"]; + [alert addButtonWithTitle:@"Submit"]; + + alert.alertViewStyle = UIAlertViewStylePlainTextInput; + UITextField* answerField = [alert textFieldAtIndex:0]; + answerField.keyboardType = UIKeyboardAppearanceDefault; + answerField.placeholder = @"Your Name"; + [alert show]; + timeRunout = YES; + } + //Pop-Up and scoring system. + + lblTimerP1.text = timerOutput; +} +- (IBAction)startTimerP2 +{ + [P1Timer invalidate]; + if (started == NO) + { + P1Timer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(displayTimerP1) userInfo:nil repeats:YES]; + AudioServicesPlaySystemSound(SoundID); + lblTimerP1.textColor = [UIColor colorWithRed:255/255.0f green:0/255.0f blue:0/255.0f alpha:1.0f]; + lblTimerP2.textColor = [UIColor colorWithRed:219/255.0f green:219/255.0f blue:219/255.0f alpha:1.0f]; + started = YES; + } + else + if (P2Timer.isValid == false) + { + P2Timer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(displayTimerP2) userInfo:nil repeats:YES]; + AudioServicesPlaySystemSound(SoundID); + lblTimerP2.textColor = [UIColor colorWithRed:255/255.0f green:0/255.0f blue:0/255.0f alpha:1.0f]; + lblTimerP1.textColor = [UIColor colorWithRed:219/255.0f green:219/255.0f blue:219/255.0f alpha:1.0f]; + } +} +- (void)displayTimerP2 +{ + timeP2 -= 0.1; + //Can skip this if want to save CPU. + milliseconds = timeP2; + seconds = milliseconds / 10; + minutes = seconds / 60; + NSString *timerOutput = [NSString stringWithFormat:@"%2d:%02d:%d",minutes % 60, seconds % 60, milliseconds % 10]; + if (timeP2 <= 0 && timeRunout == NO) + { + [P2Timer invalidate]; + UIAlertView *alert = [[UIAlertView alloc] init]; + [alert setTitle:@"Congratulations!"]; + [alert setMessage:@"P2 you are the winner! Type your name below to submit your time and name to the leaderboards."]; + [alert setDelegate:self]; + [alert addButtonWithTitle:@"Cancel"]; + [alert addButtonWithTitle:@"Submit"]; + + alert.alertViewStyle = UIAlertViewStylePlainTextInput; + UITextField* answerField = [alert textFieldAtIndex:0]; + answerField.keyboardType = UIKeyboardAppearanceDefault; + answerField.placeholder = @"Your Name"; + [alert show]; + timeRunout = YES; + } + //Pop-Up and scoring system. + + lblTimerP2.text = timerOutput; +} + +- (void)pauseButton +{ + [self.navigationController setNavigationBarHidden:YES animated:YES]; + + if (P1Timer.isValid == true) + { + resumeControl = 0; + } + else if (P2Timer.isValid == true) + { + resumeControl = 1; + } + else + { + resumeControl = 2; + } + + if (resumeControl != 2) + { + [P1Timer invalidate]; + [P2Timer invalidate]; + + pauseButton.hidden = YES; + startButton.hidden = NO; + startTimerP1.hidden = YES; + startTimerP2.hidden = YES; + + lblTimerP1.textColor = [UIColor colorWithRed:255/255.0f green:0/255.0f blue:0/255.0f alpha:1.0f]; + lblTimerP2.textColor = [UIColor colorWithRed:255/255.0f green:0/255.0f blue:0/255.0f alpha:1.0f]; + } + +} + +-(void)startButton +{ + [self updateLabels]; +} + +-(IBAction)reset +{ + if (P1Timer.isValid == true) + { + resumeControl = 0; + } + else if (P2Timer.isValid == true) + { + resumeControl = 1; + } + else + { + resumeControl = 2; + } + [P1Timer invalidate]; + [P2Timer invalidate]; + UIAlertView *alert = [[UIAlertView alloc] init]; + [alert setTitle:@"Alert!"]; + [alert setMessage:@"Are you sure you want to reset the timer?"]; + [alert setDelegate:self]; + [alert addButtonWithTitle:@"No"]; + [alert addButtonWithTitle:@"Yes"]; + [alert show]; +} + +-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex +{ + if (buttonIndex == 0) + { + [self updateLabels]; + } + if (buttonIndex == 1) + { + [self resetClock]; + } +} + +- (void)resetClock +{ + timeP1 = defaultTime; + timeP2 = defaultTime; + + milliseconds = defaultTime; + seconds = milliseconds / 10; + minutes = seconds / 60; + NSString *timerOutput = [NSString stringWithFormat:@"%2d:%02d:%d",minutes % 60, seconds % 60, milliseconds % 10]; + lblTimerP1.text = timerOutput; + lblTimerP2.text = timerOutput; + + started = NO; + timeRunout = NO; + lblTimerP1.textColor = [UIColor colorWithRed:255/255.0f green:0/255.0f blue:0/255.0f alpha:1.0f]; + lblTimerP2.textColor = [UIColor colorWithRed:255/255.0f green:0/255.0f blue:0/255.0f alpha:1.0f]; +} + +- (void)updateLabels +{ + if (resumeControl == 0) + { + P1Timer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(displayTimerP1) userInfo:nil repeats:YES]; + lblTimerP1.textColor = [UIColor colorWithRed:255/255.0f green:0/255.0f blue:0/255.0f alpha:1.0f]; + lblTimerP2.textColor = [UIColor colorWithRed:219/255.0f green:219/255.0f blue:219/255.0f alpha:1.0f]; + pauseButton.hidden = NO; + startButton.hidden = YES; + startTimerP1.hidden = NO; + startTimerP2.hidden = NO; + } + else if (resumeControl == 1) + { + P2Timer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(displayTimerP2) userInfo:nil repeats:YES]; + lblTimerP2.textColor = [UIColor colorWithRed:255/255.0f green:0/255.0f blue:0/255.0f alpha:1.0f]; + lblTimerP1.textColor = [UIColor colorWithRed:219/255.0f green:219/255.0f blue:219/255.0f alpha:1.0f]; + pauseButton.hidden = NO; + startButton.hidden = YES; + startTimerP1.hidden = NO; + startTimerP2.hidden = NO; + } +} + +- (void)checkForSettingsupdate +{ + //Check if there is an update. + /*if (defaultTime != newTime) + { + newTime = 15000; + defaultTime = newTime; + [self resetClock]; + [updateCheckTimer invalidate]; + }*/ + NSString *output = [NSString stringWithFormat:@"%li", (long)passedValue]; + label.text = output; + [updateCheckTimer invalidate]; + //label.text = @"HEI!"; +} - (void)viewDidLoad { + lblTimerP1.transform = CGAffineTransformMakeRotation(-M_PI / 1); + + defaultTime = 15000; + + [self resetClock]; + + NSURL *buttonURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"dingSFX1" ofType:@"aiff"]]; + AudioServicesCreateSystemSoundID((__bridge CFURLRef)buttonURL, &SoundID); + [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. } +- (IBAction)settingsView:(id)sender +{ + [P1Timer invalidate]; + [P2Timer invalidate]; + updateCheckTimer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(checkForSettingsupdate) userInfo:nil repeats:YES]; + ViewController *SVC = [self.storyboard instantiateViewControllerWithIdentifier:@"SettingsViewController"]; + [self presentViewController:SVC animated:YES completion:nil]; +} + - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } + @end diff --git a/ChessTimer/turnOver.aiff b/ChessTimer/turnOver.aiff new file mode 100644 index 0000000..c8db61d Binary files /dev/null and b/ChessTimer/turnOver.aiff differ diff --git a/Images/Grey Circle.png b/Images/Grey Circle.png new file mode 100644 index 0000000..6144994 Binary files /dev/null and b/Images/Grey Circle.png differ diff --git a/Images/Highscore1.png b/Images/Highscore1.png new file mode 100644 index 0000000..d507f4d Binary files /dev/null and b/Images/Highscore1.png differ diff --git a/Images/PauseButton.png b/Images/PauseButton.png new file mode 100644 index 0000000..07c8012 Binary files /dev/null and b/Images/PauseButton.png differ diff --git a/Images/PlayButton.png b/Images/PlayButton.png new file mode 100644 index 0000000..fe0734a Binary files /dev/null and b/Images/PlayButton.png differ diff --git a/Images/ResetIcon.png b/Images/ResetIcon.png new file mode 100644 index 0000000..62ebd38 Binary files /dev/null and b/Images/ResetIcon.png differ diff --git a/Images/Settings.png b/Images/Settings.png new file mode 100644 index 0000000..812231e Binary files /dev/null and b/Images/Settings.png differ diff --git a/Images/SettingsIcon.png b/Images/SettingsIcon.png new file mode 100644 index 0000000..a322323 Binary files /dev/null and b/Images/SettingsIcon.png differ diff --git a/Images/SettingsThinIcon.png b/Images/SettingsThinIcon.png new file mode 100644 index 0000000..327dfb4 Binary files /dev/null and b/Images/SettingsThinIcon.png differ diff --git a/SoundFiles/dingSFX1.aiff b/SoundFiles/dingSFX1.aiff new file mode 100644 index 0000000..97d88ba Binary files /dev/null and b/SoundFiles/dingSFX1.aiff differ diff --git a/SoundFiles/turnOver.aiff b/SoundFiles/turnOver.aiff new file mode 100644 index 0000000..c8db61d Binary files /dev/null and b/SoundFiles/turnOver.aiff differ