add category and timer

This commit is contained in:
backmeupplz
2013-12-05 15:52:13 -08:00
parent 257bd14e24
commit 0e0b7518b3
13 changed files with 410 additions and 80 deletions

View File

@@ -15,7 +15,6 @@
B3FDF3781851089B0052053B /* NKAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B3FDF3771851089B0052053B /* NKAppDelegate.m */; };
B3FDF37B1851089B0052053B /* Main_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B3FDF3791851089B0052053B /* Main_iPhone.storyboard */; };
B3FDF37E1851089B0052053B /* Main_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B3FDF37C1851089B0052053B /* Main_iPad.storyboard */; };
B3FDF3811851089B0052053B /* NKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B3FDF3801851089B0052053B /* NKViewController.m */; };
B3FDF3831851089B0052053B /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B3FDF3821851089B0052053B /* Images.xcassets */; };
B3FDF38A1851089B0052053B /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B3FDF3891851089B0052053B /* XCTest.framework */; };
B3FDF38B1851089B0052053B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B3FDF3671851089B0052053B /* Foundation.framework */; };
@@ -23,6 +22,11 @@
B3FDF3941851089B0052053B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = B3FDF3921851089B0052053B /* InfoPlist.strings */; };
B3FDF3961851089B0052053B /* Po_PomodoroTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B3FDF3951851089B0052053B /* Po_PomodoroTests.m */; };
B3FDF3A3185114BA0052053B /* SWRevealViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B3FDF3A2185114BA0052053B /* SWRevealViewController.m */; };
B3FDF3AB185117180052053B /* NKMainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B3FDF3AA185117180052053B /* NKMainViewController.m */; };
B3FDF3AE185128AD0052053B /* btn_left.png in Resources */ = {isa = PBXBuildFile; fileRef = B3FDF3AC185128AD0052053B /* btn_left.png */; };
B3FDF3AF185128AD0052053B /* btn_right.png in Resources */ = {isa = PBXBuildFile; fileRef = B3FDF3AD185128AD0052053B /* btn_right.png */; };
B3FDF3B318513DAB0052053B /* NKTimerLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = B3FDF3B218513DAB0052053B /* NKTimerLabel.m */; };
B3FDF3B618513E480052053B /* NSString+Time.m in Sources */ = {isa = PBXBuildFile; fileRef = B3FDF3B518513E480052053B /* NSString+Time.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -48,8 +52,6 @@
B3FDF3771851089B0052053B /* NKAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NKAppDelegate.m; sourceTree = "<group>"; };
B3FDF37A1851089B0052053B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPhone.storyboard; sourceTree = "<group>"; };
B3FDF37D1851089B0052053B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPad.storyboard; sourceTree = "<group>"; };
B3FDF37F1851089B0052053B /* NKViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NKViewController.h; sourceTree = "<group>"; };
B3FDF3801851089B0052053B /* NKViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NKViewController.m; sourceTree = "<group>"; };
B3FDF3821851089B0052053B /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
B3FDF3881851089B0052053B /* Po-PomodoroTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Po-PomodoroTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
B3FDF3891851089B0052053B /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
@@ -58,6 +60,14 @@
B3FDF3951851089B0052053B /* Po_PomodoroTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Po_PomodoroTests.m; sourceTree = "<group>"; };
B3FDF3A1185114BA0052053B /* SWRevealViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SWRevealViewController.h; sourceTree = "<group>"; };
B3FDF3A2185114BA0052053B /* SWRevealViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SWRevealViewController.m; sourceTree = "<group>"; };
B3FDF3A9185117180052053B /* NKMainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NKMainViewController.h; sourceTree = "<group>"; };
B3FDF3AA185117180052053B /* NKMainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NKMainViewController.m; sourceTree = "<group>"; };
B3FDF3AC185128AD0052053B /* btn_left.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = btn_left.png; sourceTree = "<group>"; };
B3FDF3AD185128AD0052053B /* btn_right.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = btn_right.png; sourceTree = "<group>"; };
B3FDF3B118513DAB0052053B /* NKTimerLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NKTimerLabel.h; sourceTree = "<group>"; };
B3FDF3B218513DAB0052053B /* NKTimerLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NKTimerLabel.m; sourceTree = "<group>"; };
B3FDF3B418513E480052053B /* NSString+Time.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+Time.h"; sourceTree = "<group>"; };
B3FDF3B518513E480052053B /* NSString+Time.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+Time.m"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -87,6 +97,8 @@
B3FDF35B1851089A0052053B = {
isa = PBXGroup;
children = (
B3FDF3791851089B0052053B /* Main_iPhone.storyboard */,
B3FDF37C1851089B0052053B /* Main_iPad.storyboard */,
B3FDF36D1851089B0052053B /* Po-Pomodoro */,
B3FDF38F1851089B0052053B /* Po-PomodoroTests */,
B3FDF3661851089A0052053B /* Frameworks */,
@@ -118,13 +130,10 @@
B3FDF36D1851089B0052053B /* Po-Pomodoro */ = {
isa = PBXGroup;
children = (
B3FDF3761851089B0052053B /* NKAppDelegate.h */,
B3FDF3771851089B0052053B /* NKAppDelegate.m */,
B3FDF3791851089B0052053B /* Main_iPhone.storyboard */,
B3FDF37C1851089B0052053B /* Main_iPad.storyboard */,
B3FDF37F1851089B0052053B /* NKViewController.h */,
B3FDF3801851089B0052053B /* NKViewController.m */,
B3FDF3821851089B0052053B /* Images.xcassets */,
B3FDF3A6185115B30052053B /* Controller */,
B3FDF3A5185115AE0052053B /* Model */,
B3FDF3A4185115A60052053B /* View */,
B3FDF3B0185128D10052053B /* Images */,
B3FDF36E1851089B0052053B /* Supporting Files */,
);
path = "Po-Pomodoro";
@@ -133,6 +142,7 @@
B3FDF36E1851089B0052053B /* Supporting Files */ = {
isa = PBXGroup;
children = (
B3FDF3821851089B0052053B /* Images.xcassets */,
B3FDF36F1851089B0052053B /* Po-Pomodoro-Info.plist */,
B3FDF3701851089B0052053B /* InfoPlist.strings */,
B3FDF3731851089B0052053B /* main.m */,
@@ -176,6 +186,44 @@
path = SWRevealViewController;
sourceTree = "<group>";
};
B3FDF3A4185115A60052053B /* View */ = {
isa = PBXGroup;
children = (
B3FDF3B118513DAB0052053B /* NKTimerLabel.h */,
B3FDF3B218513DAB0052053B /* NKTimerLabel.m */,
);
name = View;
sourceTree = "<group>";
};
B3FDF3A5185115AE0052053B /* Model */ = {
isa = PBXGroup;
children = (
B3FDF3761851089B0052053B /* NKAppDelegate.h */,
B3FDF3771851089B0052053B /* NKAppDelegate.m */,
B3FDF3B418513E480052053B /* NSString+Time.h */,
B3FDF3B518513E480052053B /* NSString+Time.m */,
);
name = Model;
sourceTree = "<group>";
};
B3FDF3A6185115B30052053B /* Controller */ = {
isa = PBXGroup;
children = (
B3FDF3A9185117180052053B /* NKMainViewController.h */,
B3FDF3AA185117180052053B /* NKMainViewController.m */,
);
name = Controller;
sourceTree = "<group>";
};
B3FDF3B0185128D10052053B /* Images */ = {
isa = PBXGroup;
children = (
B3FDF3AC185128AD0052053B /* btn_left.png */,
B3FDF3AD185128AD0052053B /* btn_right.png */,
);
name = Images;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -254,6 +302,8 @@
buildActionMask = 2147483647;
files = (
B3FDF37E1851089B0052053B /* Main_iPad.storyboard in Resources */,
B3FDF3AF185128AD0052053B /* btn_right.png in Resources */,
B3FDF3AE185128AD0052053B /* btn_left.png in Resources */,
B3FDF3831851089B0052053B /* Images.xcassets in Resources */,
B3FDF37B1851089B0052053B /* Main_iPhone.storyboard in Resources */,
B3FDF3721851089B0052053B /* InfoPlist.strings in Resources */,
@@ -275,9 +325,11 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B3FDF3811851089B0052053B /* NKViewController.m in Sources */,
B3FDF3741851089B0052053B /* main.m in Sources */,
B3FDF3B318513DAB0052053B /* NKTimerLabel.m in Sources */,
B3FDF3781851089B0052053B /* NKAppDelegate.m in Sources */,
B3FDF3AB185117180052053B /* NKMainViewController.m in Sources */,
B3FDF3B618513E480052053B /* NSString+Time.m in Sources */,
B3FDF3A3185114BA0052053B /* SWRevealViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -315,6 +367,7 @@
B3FDF37A1851089B0052053B /* Base */,
);
name = Main_iPhone.storyboard;
path = "Po-Pomodoro";
sourceTree = "<group>";
};
B3FDF37C1851089B0052053B /* Main_iPad.storyboard */ = {
@@ -323,6 +376,7 @@
B3FDF37D1851089B0052053B /* Base */,
);
name = Main_iPad.storyboard;
path = "Po-Pomodoro";
sourceTree = "<group>";
};
B3FDF3921851089B0052053B /* InfoPlist.strings */ = {

View File

@@ -1,23 +1,183 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4451" systemVersion="13A461" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3676"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/>
</dependencies>
<scenes>
<!--class Prefix:identifier View Controller-->
<!--Reveal View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="NKViewController" sceneMemberID="viewController">
<viewController id="BYZ-38-t0r" customClass="SWRevealViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="hJO-DI-5FH"/>
<viewControllerLayoutGuide type="bottom" id="faK-uP-ZER"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="20" width="768" height="1004"/>
<rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
<connections>
<segue destination="zT7-eL-2B4" kind="custom" identifier="sw_rear" customClass="SWRevealViewControllerSegue" id="gme-Nd-a8E"/>
<segue destination="7BC-GU-s0Y" kind="custom" identifier="sw_front" customClass="SWRevealViewControllerSegue" id="iie-fO-Fgv"/>
<segue destination="cJu-dG-voA" kind="custom" identifier="sw_right" customClass="SWRevealViewControllerSegue" id="aqU-BR-aje"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-91" y="-95"/>
</scene>
<!--View Controller-->
<scene sceneID="T30-XG-kGU">
<objects>
<viewController id="zT7-eL-2B4" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="TQP-z4-NNN"/>
<viewControllerLayoutGuide type="bottom" id="dzm-dU-PEL"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="BaD-Ph-Zom">
<rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Привет! Я боковой ViewController" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ujh-1d-QpR">
<rect key="frame" x="0.0" y="501" width="268" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="EJb-vT-DKs" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="898" y="-1212"/>
</scene>
<!--Main View Controller-->
<scene sceneID="vvd-Tf-bcD">
<objects>
<viewController id="7BC-GU-s0Y" customClass="NKMainViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="xWv-I4-deC"/>
<viewControllerLayoutGuide type="bottom" id="zu7-Wn-snh"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="foK-xn-8sv">
<rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Po-Pomodoro" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yGx-Yi-gsY">
<rect key="frame" x="243" y="52" width="282" height="35"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="HelveticaNeue-UltraLight" family="Helvetica Neue" pointSize="46"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="25:00" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8vU-uH-BI3" customClass="NKTimerLabel">
<rect key="frame" x="243" y="485" width="282" height="53"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="HelveticaNeue-UltraLight" family="Helvetica Neue" pointSize="46"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Introduced by Nikita Kolmogorov" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Nna-yH-AYM">
<rect key="frame" x="243" y="95" width="282" height="35"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="HelveticaNeue-UltraLight" family="Helvetica Neue" pointSize="18"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="E2y-iT-NiX">
<rect key="frame" x="20" y="20" width="40" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<inset key="imageEdgeInsets" minX="10" minY="10" maxX="10" maxY="10"/>
<state key="normal" image="btn_left.png">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="toggleLeftTouched:" destination="7BC-GU-s0Y" eventType="touchUpInside" id="PiG-tO-nLm"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kWF-OL-NNP">
<rect key="frame" x="708" y="20" width="40" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<inset key="contentEdgeInsets" minX="10" minY="10" maxX="10" maxY="10"/>
<state key="normal" image="btn_right.png">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="toggleRightTouched:" destination="7BC-GU-s0Y" eventType="touchUpInside" id="e2U-Vr-236"/>
</connections>
</button>
<datePicker autoresizesSubviews="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" datePickerMode="time" minuteInterval="1" translatesAutoresizingMaskIntoConstraints="NO" id="gLe-bN-aIJ">
<rect key="frame" x="133" y="564" width="502" height="216"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<date key="date" timeIntervalSinceReferenceDate="407974353.76981699">
<!--2013-12-05 22:12:33 +0000-->
</date>
<timeZone key="timeZone" name="America/Los_Angeles">
<mutableData key="data">
VFppZgAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAC5AAAABAAAABCepkign7sVkKCGKqChmveQ
y4kaoNIj9HDSYSYQ1v50INiArZDa/tGg28CQENzes6DdqayQ3r6VoN+JjpDgnneg4WlwkOJ+WaDjSVKQ
5F47oOUpNJDmR1gg5xJREOgnOiDo8jMQ6gccIOrSFRDr5v4g7LH3EO3G4CDukdkQ76/8oPBxuxDxj96g
8n/BkPNvwKD0X6OQ9U+ioPY/hZD3L4Sg+CiiEPkPZqD6CIQQ+viDIPvoZhD82GUg/chIEP64RyD/qCoQ
AJgpIAGIDBACeAsgA3EokARhJ6AFUQqQBkEJoAcw7JAHjUOgCRDOkAmtvyAK8LCQC+CvoAzZzRANwJGg
DrmvEA+priAQmZEQEYmQIBJ5cxATaXIgFFlVEBVJVCAWOTcQFyk2IBgiU5AZCRggGgI1kBryNKAb4heQ
HNIWoB3B+ZAesfigH6HbkCB2KyAhgb2QIlYNICNq2hAkNe8gJUq8ECYV0SAnKp4QJ/7toCkKgBAp3s+g
KupiECu+saAs036QLZ6ToC6zYJAvfnWgMJNCkDFnkiAycySQM0d0IDRTBpA1J1YgNjLokDcHOCA4HAUQ
OOcaIDn75xA6xvwgO9vJEDywGKA9u6sQPo/6oD+bjRBAb9ygQYSpkEJPvqBDZIuQRC+goEVEbZBF89Mg
Ry2KEEfTtSBJDWwQSbOXIErtThBLnLOgTNZqkE18laBOtkyQT1x3oFCWLpBRPFmgUnYQkFMcO6BUVfKQ
VPwdoFY11JBW5TogWB7xEFjFHCBZ/tMQWqT+IFvetRBchOAgXb6XEF5kwiBfnnkQYE3eoGGHlZBiLcCg
Y2d3kGQNoqBlR1mQZe2EoGcnO5BnzWagaQcdkGmtSKBq5v+Qa5ZlIGzQHBBtdkcgbq/+EG9WKSBwj+AQ
cTYLIHJvwhBzFe0gdE+kEHT/CaB2OMCQdt7roHgYopB4vs2gefiEkHqer6B72GaQfH6RoH24SJB+XnOg
f5gqkAABAAECAwEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA
</mutableData>
</timeZone>
</datePicker>
</subviews>
<color key="backgroundColor" red="1" green="0.92205851015354146" blue="0.93625991787676111" alpha="1" colorSpace="calibratedRGB"/>
</view>
<connections>
<outlet property="timerLabel" destination="8vU-uH-BI3" id="vHY-uI-MBP"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="049-db-XAy" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="898" y="-95"/>
</scene>
<!--View Controller-->
<scene sceneID="Wc5-db-Yhe">
<objects>
<viewController id="cJu-dG-voA" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="XPU-6h-LUO"/>
<viewControllerLayoutGuide type="bottom" id="HcV-0H-2Xb"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="CaB-HX-fIe">
<rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Привет! Я правый (\о) ViewController" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="53e-uD-3Ze">
<rect key="frame" x="0.0" y="501" width="289" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="xdn-oV-hZW" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="898" y="1024"/>
</scene>
</scenes>
<resources>
<image name="btn_left.png" width="128" height="128"/>
<image name="btn_right.png" width="128" height="128"/>
</resources>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar" statusBarStyle="blackOpaque"/>
<simulatedOrientationMetrics key="orientation"/>

View File

@@ -12,35 +12,8 @@
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
return YES;
}
- (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.
}
- (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.
}
- (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.
}
- (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.
}
- (void)applicationWillTerminate:(UIApplication *)application
{
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
@end

View File

@@ -0,0 +1,21 @@
//
// NKMainViewController.h
// Po-Pomodoro
//
// Created by Nikita Kolmogorov on 05.12.13.
// Copyright (c) 2013 Nikita Kolmogorov. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "SWRevealViewController.h"
#import "NKTimerLabel.h"
@interface NKMainViewController : UIViewController <SWRevealViewControllerDelegate>
// UI properties
@property (weak, nonatomic) IBOutlet NKTimerLabel *timerLabel;
- (IBAction)toggleLeftTouched:(UIButton *)sender;
- (IBAction)toggleRightTouched:(UIButton *)sender;
@end

View File

@@ -0,0 +1,30 @@
//
// NKMainViewController.m
// Po-Pomodoro
//
// Created by Nikita Kolmogorov on 05.12.13.
// Copyright (c) 2013 Nikita Kolmogorov. All rights reserved.
//
#import "NKMainViewController.h"
@implementation NKMainViewController
- (void)viewDidLoad
{
[super viewDidLoad];
[self.view addGestureRecognizer:self.revealViewController.panGestureRecognizer];
}
- (IBAction)toggleLeftTouched:(UIButton *)sender
{
[self.revealViewController revealToggle:nil];
}
- (IBAction)toggleRightTouched:(UIButton *)sender
{
[self.revealViewController rightRevealToggle:nil];
}
@end

View File

@@ -1,5 +1,5 @@
//
// NKViewController.h
// NKTimerLabel.h
// Po-Pomodoro
//
// Created by Nikita Kolmogorov on 05.12.13.
@@ -8,6 +8,11 @@
#import <UIKit/UIKit.h>
@interface NKViewController : UIViewController
@interface NKTimerLabel : UILabel
- (void)startCountDown;
- (void)stopCountDown;
@end

View File

@@ -0,0 +1,49 @@
//
// NKTimerLabel.m
// Po-Pomodoro
//
// Created by Nikita Kolmogorov on 05.12.13.
// Copyright (c) 2013 Nikita Kolmogorov. All rights reserved.
//
#import "NKTimerLabel.h"
#import "NSString+Time.h"
@implementation NKTimerLabel {
NSTimer *timer;
}
#pragma mark - View life cycle -
- (void)awakeFromNib
{
[super awakeFromNib];
[self startCountDown];
}
#pragma mark - General methods -
- (void)startCountDown
{
if (!timer.isValid)
timer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(decrementByOneSecond) userInfo:nil repeats:YES];
}
- (void)stopCountDown
{
[timer invalidate];
}
- (void)decrementByOneSecond
{
int time = [self.text seconds];
time--;
int hours = time/3600;
time %= 3600;
int minutes = time / 60;
int seconds = time % 60;
self.text = [NSString stringFromHours:hours minutes:minutes seconds:seconds];
}
@end

View File

@@ -1,29 +0,0 @@
//
// NKViewController.m
// Po-Pomodoro
//
// Created by Nikita Kolmogorov on 05.12.13.
// Copyright (c) 2013 Nikita Kolmogorov. All rights reserved.
//
#import "NKViewController.h"
@interface NKViewController ()
@end
@implementation NKViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end

View File

@@ -0,0 +1,16 @@
//
// NSString+Time.h
// Po-Pomodoro
//
// Created by Nikita Kolmogorov on 05.12.13.
// Copyright (c) 2013 Nikita Kolmogorov. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSString (Time)
+ (NSString *)stringFromHours:(int)hours minutes:(int)minutes seconds:(int)seconds;
- (int)seconds;
@end

View File

@@ -0,0 +1,51 @@
//
// NSString+Time.m
// Po-Pomodoro
//
// Created by Nikita Kolmogorov on 05.12.13.
// Copyright (c) 2013 Nikita Kolmogorov. All rights reserved.
//
#import "NSString+Time.h"
@implementation NSString (Time)
+ (NSString *)stringFromHours:(int)hours minutes:(int)minutes seconds:(int)seconds
{
if (hours) {
return [NSString stringWithFormat:@"%02d:%02d:%02d",hours,minutes,seconds];
} else {
return [NSString stringWithFormat:@"%02d:%02d",minutes,seconds];
}
}
- (int)seconds
{
// Initialize variables
NSRange range;
int hours = 0;
NSString *temp = self;
// Check if hours included
if (self.length > 5) {
// Get hours
range = [self rangeOfString:@":"];
hours = [self substringToIndex:range.location].intValue;
// Cut off hours
temp = [self substringFromIndex:range.location+range.length];
}
// Get minutes
range = [temp rangeOfString:@":"];
int minutes = [temp substringToIndex:range.location].intValue;
// Get seconds
int seconds = [temp substringFromIndex:range.location+range.length].intValue;
// Return seconds
return (hours * 3600) + (minutes * 60) + seconds;
}
@end

BIN
Po-Pomodoro/btn_left.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
Po-Pomodoro/btn_right.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -410,10 +410,10 @@ const int FrontViewPositionNone = 0xff;
_rightViewPosition = FrontViewPositionLeft;
_rearViewRevealWidth = 260.0f;
_rearViewRevealOverdraw = 60.0f;
_rearViewRevealDisplacement = 40.0f;
_rearViewRevealDisplacement = 0.0f;
_rightViewRevealWidth = 260.0f;
_rightViewRevealOverdraw = 60.0f;
_rightViewRevealDisplacement = 40.0f;
_rightViewRevealDisplacement = 0.0f;
_bounceBackOnOverdraw = YES;
_bounceBackOnLeftOverdraw = YES;
_stableDragOnOverdraw = NO;
@@ -421,9 +421,9 @@ const int FrontViewPositionNone = 0xff;
_presentFrontViewHierarchically = NO;
_quickFlickVelocity = 250.0f;
_toggleAnimationDuration = 0.25;
_frontViewShadowRadius = 2.5f;
_frontViewShadowOffset = CGSizeMake(0.0f, 2.5f);
_frontViewShadowOpacity = 1.0f;
_frontViewShadowRadius = 0.0f;
_frontViewShadowOffset = CGSizeMake(0.0f, 0.0f);
_frontViewShadowOpacity = 0.0f;
_userInteractionStore = YES;
_animationQueue = [NSMutableArray array];
_draggableBorderWidth = 0.0f;