Skip to content

Commit 4ef6b1e

Browse files
author
Steve Trease
committed
Added copy of yesterday's step count to pasteboard if yesterday's steps label pressed.
1 parent eed26b3 commit 4ef6b1e

File tree

9 files changed

+36
-7
lines changed

9 files changed

+36
-7
lines changed

build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
635
1+
640

iOS Steps Today/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<key>CFBundleShortVersionString</key>
2020
<string>1.0</string>
2121
<key>CFBundleVersion</key>
22-
<string>635</string>
22+
<string>640</string>
2323
<key>NSExtension</key>
2424
<dict>
2525
<key>NSExtensionMainStoryboard</key>

iOS Steps Watch Extension/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<key>CFBundleShortVersionString</key>
2020
<string>1.0</string>
2121
<key>CFBundleVersion</key>
22-
<string>635</string>
22+
<string>640</string>
2323
<key>NSExtension</key>
2424
<dict>
2525
<key>NSExtensionAttributes</key>

iOS Steps Watch/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<key>CFBundleShortVersionString</key>
2020
<string>1.0</string>
2121
<key>CFBundleVersion</key>
22-
<string>635</string>
22+
<string>640</string>
2323
<key>UIBackgroundModes</key>
2424
<array/>
2525
<key>UISupportedInterfaceOrientations</key>

iOS Steps.xcworkspace/xcuserdata/steve.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,22 @@
22
<Bucket
33
type = "0"
44
version = "2.0">
5+
<Breakpoints>
6+
<BreakpointProxy
7+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
8+
<BreakpointContent
9+
shouldBeEnabled = "No"
10+
ignoreCount = "0"
11+
continueAfterRunningActions = "No"
12+
filePath = "iOS Steps/DayViewController.swift"
13+
timestampString = "528991594.520078"
14+
startingColumnNumber = "9223372036854775807"
15+
endingColumnNumber = "9223372036854775807"
16+
startingLineNumber = "61"
17+
endingLineNumber = "61"
18+
landmarkName = "viewDidLoad()"
19+
landmarkType = "7">
20+
</BreakpointContent>
21+
</BreakpointProxy>
22+
</Breakpoints>
523
</Bucket>

iOS Steps/Base.lproj/LaunchScreen.storyboard

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
2222
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
2323
<subviews>
24-
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Build: 635 (3313153)" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yhA-lX-4Of" userLabel="APP_VERSION">
24+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Build: 640 (eed26b3)" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yhA-lX-4Of" userLabel="APP_VERSION">
2525
<rect key="frame" x="132.5" y="527" width="55.5" height="21"/>
2626
<fontDescription key="fontDescription" type="system" pointSize="17"/>
2727
<nil key="textColor"/>

iOS Steps/Base.lproj/LaunchScreen.storyboardbak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
2222
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
2323
<subviews>
24-
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Build: 634 (3313153)" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yhA-lX-4Of" userLabel="APP_VERSION">
24+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Build: 639 (eed26b3)" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yhA-lX-4Of" userLabel="APP_VERSION">
2525
<rect key="frame" x="132.5" y="527" width="55.5" height="21"/>
2626
<fontDescription key="fontDescription" type="system" pointSize="17"/>
2727
<nil key="textColor"/>

iOS Steps/DayViewController.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ class DayViewController: UIViewController {
5454

5555
updateHealthData()
5656
drawScreen()
57+
58+
59+
yesterdayStepCountLabel.isUserInteractionEnabled = true
60+
let gestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(DayViewController.copyStepsPressed))
61+
yesterdayStepCountLabel.addGestureRecognizer(gestureRecognizer)
5762
}
5863

5964

@@ -253,6 +258,12 @@ class DayViewController: UIViewController {
253258
}
254259

255260

261+
func copyStepsPressed () {
262+
print (NSURL (fileURLWithPath: "\(#file)").lastPathComponent!, "\(#function)")
263+
UIPasteboard.general.string = String(Int(healthKitManager.stepsYesterday))
264+
}
265+
266+
256267
@IBAction func shareButtonClicked(sender: UIButton) {
257268
print (NSURL (fileURLWithPath: "\(#file)").lastPathComponent!, "\(#function)")
258269

iOS Steps/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</dict>
2929
</array>
3030
<key>CFBundleVersion</key>
31-
<string>635</string>
31+
<string>640</string>
3232
<key>LSRequiresIPhoneOS</key>
3333
<true/>
3434
<key>NSHealthShareUsageDescription</key>

0 commit comments

Comments
 (0)