Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加多种按键触发的模式:空格启停;esc重置;backspace修改时间 #2

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 37 additions & 35 deletions TomatoKitchenTimer.xcodeproj/project.pbxproj
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
85331A5A1CF3EFA70086BE54 /* TomatoKitchenTimer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TomatoKitchenTimer.app; sourceTree = BUILT_PRODUCTS_DIR; };
85331A5A1CF3EFA70086BE54 /* Scream Timer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Scream Timer.app"; sourceTree = BUILT_PRODUCTS_DIR; };
85331A5D1CF3EFA70086BE54 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
85331A5F1CF3EFA70086BE54 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
85331A611CF3EFA70086BE54 /* Document.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Document.swift; sourceTree = "<group>"; };
85331A631CF3EFA70086BE54 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
85331A661CF3EFA70086BE54 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
85331A681CF3EFA70086BE54 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
85331A6D1CF3EFA80086BE54 /* TomatoKitchenTimer.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TomatoKitchenTimer.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
85331A6D1CF3EFA80086BE54 /* Scream Timer.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Scream Timer.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
85331A711CF3EFA80086BE54 /* TomatoKitchenTimerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TomatoKitchenTimerTests.swift; sourceTree = "<group>"; };
85331A731CF3EFA80086BE54 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
85331A781CF3EFA80086BE54 /* TomatoKitchenTimer.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TomatoKitchenTimer.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
85331A781CF3EFA80086BE54 /* Scream Timer.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Scream Timer.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
85331A7E1CF3EFA80086BE54 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
85331A8D1CF4B2430086BE54 /* TimerCore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TimerCore.swift; sourceTree = "<group>"; };
85331A921CF4B9500086BE54 /* TomatoKitchenTimerUITests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TomatoKitchenTimerUITests-Bridging-Header.h"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -115,9 +115,9 @@
85331A5B1CF3EFA70086BE54 /* Products */ = {
isa = PBXGroup;
children = (
85331A5A1CF3EFA70086BE54 /* TomatoKitchenTimer.app */,
85331A6D1CF3EFA80086BE54 /* TomatoKitchenTimer.xctest */,
85331A781CF3EFA80086BE54 /* TomatoKitchenTimer.xctest */,
85331A5A1CF3EFA70086BE54 /* Scream Timer.app */,
85331A6D1CF3EFA80086BE54 /* Scream Timer.xctest */,
85331A781CF3EFA80086BE54 /* Scream Timer.xctest */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -175,9 +175,9 @@
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
85331A591CF3EFA70086BE54 /* TomatoKitchenTimer */ = {
85331A591CF3EFA70086BE54 /* Scream Timer */ = {
isa = PBXNativeTarget;
buildConfigurationList = 85331A811CF3EFA80086BE54 /* Build configuration list for PBXNativeTarget "TomatoKitchenTimer" */;
buildConfigurationList = 85331A811CF3EFA80086BE54 /* Build configuration list for PBXNativeTarget "Scream Timer" */;
buildPhases = (
85331A561CF3EFA70086BE54 /* Sources */,
85331A571CF3EFA70086BE54 /* Frameworks */,
Expand All @@ -187,14 +187,14 @@
);
dependencies = (
);
name = TomatoKitchenTimer;
name = "Scream Timer";
productName = BigTimer;
productReference = 85331A5A1CF3EFA70086BE54 /* TomatoKitchenTimer.app */;
productReference = 85331A5A1CF3EFA70086BE54 /* Scream Timer.app */;
productType = "com.apple.product-type.application";
};
85331A6C1CF3EFA80086BE54 /* TomatoKitchenTimerTests */ = {
85331A6C1CF3EFA80086BE54 /* Scream TimerTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 85331A841CF3EFA80086BE54 /* Build configuration list for PBXNativeTarget "TomatoKitchenTimerTests" */;
buildConfigurationList = 85331A841CF3EFA80086BE54 /* Build configuration list for PBXNativeTarget "Scream TimerTests" */;
buildPhases = (
85331A691CF3EFA80086BE54 /* Sources */,
85331A6A1CF3EFA80086BE54 /* Frameworks */,
Expand All @@ -205,14 +205,14 @@
dependencies = (
85331A6F1CF3EFA80086BE54 /* PBXTargetDependency */,
);
name = TomatoKitchenTimerTests;
name = "Scream TimerTests";
productName = BigTimerTests;
productReference = 85331A6D1CF3EFA80086BE54 /* TomatoKitchenTimer.xctest */;
productReference = 85331A6D1CF3EFA80086BE54 /* Scream Timer.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
85331A771CF3EFA80086BE54 /* TomatoKitchenTimerUITests */ = {
85331A771CF3EFA80086BE54 /* Scream TimerUITests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 85331A871CF3EFA80086BE54 /* Build configuration list for PBXNativeTarget "TomatoKitchenTimerUITests" */;
buildConfigurationList = 85331A871CF3EFA80086BE54 /* Build configuration list for PBXNativeTarget "Scream TimerUITests" */;
buildPhases = (
85331A741CF3EFA80086BE54 /* Sources */,
85331A751CF3EFA80086BE54 /* Frameworks */,
Expand All @@ -223,9 +223,9 @@
dependencies = (
85331A7A1CF3EFA80086BE54 /* PBXTargetDependency */,
);
name = TomatoKitchenTimerUITests;
name = "Scream TimerUITests";
productName = BigTimerUITests;
productReference = 85331A781CF3EFA80086BE54 /* TomatoKitchenTimer.xctest */;
productReference = 85331A781CF3EFA80086BE54 /* Scream Timer.xctest */;
productType = "com.apple.product-type.bundle.ui-testing";
};
/* End PBXNativeTarget section */
Expand All @@ -235,7 +235,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 1150;
LastUpgradeCheck = 1310;
ORGANIZATIONNAME = JackyShen;
TargetAttributes = {
85331A591CF3EFA70086BE54 = {
Expand Down Expand Up @@ -267,9 +267,9 @@
projectDirPath = "";
projectRoot = "";
targets = (
85331A591CF3EFA70086BE54 /* TomatoKitchenTimer */,
85331A6C1CF3EFA80086BE54 /* TomatoKitchenTimerTests */,
85331A771CF3EFA80086BE54 /* TomatoKitchenTimerUITests */,
85331A591CF3EFA70086BE54 /* Scream Timer */,
85331A6C1CF3EFA80086BE54 /* Scream TimerTests */,
85331A771CF3EFA80086BE54 /* Scream TimerUITests */,
);
};
/* End PBXProject section */
Expand Down Expand Up @@ -343,12 +343,12 @@
/* Begin PBXTargetDependency section */
85331A6F1CF3EFA80086BE54 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 85331A591CF3EFA70086BE54 /* TomatoKitchenTimer */;
target = 85331A591CF3EFA70086BE54 /* Scream Timer */;
targetProxy = 85331A6E1CF3EFA80086BE54 /* PBXContainerItemProxy */;
};
85331A7A1CF3EFA80086BE54 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 85331A591CF3EFA70086BE54 /* TomatoKitchenTimer */;
target = 85331A591CF3EFA70086BE54 /* Scream Timer */;
targetProxy = 85331A791CF3EFA80086BE54 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
Expand Down Expand Up @@ -389,6 +389,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -445,6 +446,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -480,7 +482,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.15;
PRODUCT_BUNDLE_IDENTIFIER = com.mebusw.TomatoKitchenTimer;
PRODUCT_NAME = TomatoKitchenTimer;
PRODUCT_NAME = "Scream Timer";
SWIFT_VERSION = 5.0;
};
name = Debug;
Expand All @@ -495,7 +497,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.15;
PRODUCT_BUNDLE_IDENTIFIER = com.mebusw.TomatoKitchenTimer;
PRODUCT_NAME = TomatoKitchenTimer;
PRODUCT_NAME = "Scream Timer";
SWIFT_VERSION = 5.0;
};
name = Release;
Expand All @@ -508,9 +510,9 @@
INFOPLIST_FILE = TomatoKitchenTimerTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.mebusw.TomatoKitchenTimerTests;
PRODUCT_NAME = TomatoKitchenTimer;
PRODUCT_NAME = "Scream Timer";
SWIFT_VERSION = 3.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TomatoKitchenTimer.app/Contents/MacOS/TomatoKitchenTimer";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Scream Timer.app/Contents/MacOS/Scream Timer";
};
name = Debug;
};
Expand All @@ -522,9 +524,9 @@
INFOPLIST_FILE = TomatoKitchenTimerTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.mebusw.TomatoKitchenTimerTests;
PRODUCT_NAME = TomatoKitchenTimer;
PRODUCT_NAME = "Scream Timer";
SWIFT_VERSION = 3.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TomatoKitchenTimer.app/Contents/MacOS/TomatoKitchenTimer";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Scream Timer.app/Contents/MacOS/Scream Timer";
};
name = Release;
};
Expand All @@ -536,7 +538,7 @@
INFOPLIST_FILE = TomatoKitchenTimerUITests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.mebusw.TomatoKitchenTimerUITests;
PRODUCT_NAME = TomatoKitchenTimer;
PRODUCT_NAME = "Scream Timer";
SWIFT_OBJC_BRIDGING_HEADER = "TomatoKitchenTimerUITests/TomatoKitchenTimerUITests-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
Expand All @@ -552,7 +554,7 @@
INFOPLIST_FILE = TomatoKitchenTimerUITests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.mebusw.TomatoKitchenTimerUITests;
PRODUCT_NAME = TomatoKitchenTimer;
PRODUCT_NAME = "Scream Timer";
SWIFT_OBJC_BRIDGING_HEADER = "TomatoKitchenTimerUITests/TomatoKitchenTimerUITests-Bridging-Header.h";
SWIFT_VERSION = 3.0;
TEST_TARGET_NAME = TomatoKitchenTimer;
Expand All @@ -571,7 +573,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
85331A811CF3EFA80086BE54 /* Build configuration list for PBXNativeTarget "TomatoKitchenTimer" */ = {
85331A811CF3EFA80086BE54 /* Build configuration list for PBXNativeTarget "Scream Timer" */ = {
isa = XCConfigurationList;
buildConfigurations = (
85331A821CF3EFA80086BE54 /* Debug */,
Expand All @@ -580,7 +582,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
85331A841CF3EFA80086BE54 /* Build configuration list for PBXNativeTarget "TomatoKitchenTimerTests" */ = {
85331A841CF3EFA80086BE54 /* Build configuration list for PBXNativeTarget "Scream TimerTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
85331A851CF3EFA80086BE54 /* Debug */,
Expand All @@ -589,7 +591,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
85331A871CF3EFA80086BE54 /* Build configuration list for PBXNativeTarget "TomatoKitchenTimerUITests" */ = {
85331A871CF3EFA80086BE54 /* Build configuration list for PBXNativeTarget "Scream TimerUITests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
85331A881CF3EFA80086BE54 /* Debug */,
Expand Down
2 changes: 1 addition & 1 deletion TomatoKitchenTimer.xcodeproj/project.xcworkspace/contents.xcworkspacedata
100644 → 100755

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file.
12 changes: 8 additions & 4 deletions TomatoKitchenTimer/Base.lproj/Main.storyboard
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="16097" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="19455" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="16097"/>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="19455"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand Down Expand Up @@ -679,7 +680,7 @@
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" preferredMaxLayoutWidth="246" translatesAutoresizingMaskIntoConstraints="NO" id="TyV-c9-G0C">
<rect key="frame" x="-2" y="176" width="804" height="223"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="center" title="00:00:00" id="Cc7-nU-5Mv">
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="center" title="00:00" id="Cc7-nU-5Mv">
<font key="font" size="164" name="AndaleMono"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
Expand All @@ -688,10 +689,13 @@
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="p2p-Jm-wOA">
<rect key="frame" x="108" y="78" width="162" height="49"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" enabled="NO" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="right" title="00:00:00" drawsBackground="YES" id="9zR-mf-6dc">
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" enabled="NO" sendsActionOnEndEditing="YES" state="on" borderStyle="border" alignment="center" title="00:00" drawsBackground="YES" id="9zR-mf-6dc">
<font key="font" metaFont="system" size="36"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
<allowedInputSourceLocales>
<string>NSAllRomanInputSourcesLocaleIdentifier</string>
</allowedInputSourceLocales>
</textFieldCell>
<connections>
<outlet property="delegate" destination="5gI-5U-AMq" id="yl2-Hu-jD0"/>
Expand Down
Loading