Skip to content

Commit d1a2a97

Browse files
committed
Added button animation and the ability to enter the timer value.
1 parent fdbafc5 commit d1a2a97

23 files changed

+688
-202
lines changed

.DS_Store

0 Bytes
Binary file not shown.

Podfile

+2
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ target 'TimerApp' do
99

1010
pod 'SnapKit'
1111

12+
pod 'Spring', :git => 'https://github.com/MengTo/Spring.git'
13+
1214
end

Podfile.lock

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,28 @@
11
PODS:
22
- SnapKit (5.0.1)
3+
- Spring (1.0.6)
34

45
DEPENDENCIES:
56
- SnapKit
7+
- Spring (from `https://github.com/MengTo/Spring.git`)
68

79
SPEC REPOS:
810
trunk:
911
- SnapKit
1012

13+
EXTERNAL SOURCES:
14+
Spring:
15+
:git: https://github.com/MengTo/Spring.git
16+
17+
CHECKOUT OPTIONS:
18+
Spring:
19+
:commit: 50d92a5b9e08848387ae95bf44c6ad20834f7083
20+
:git: https://github.com/MengTo/Spring.git
21+
1122
SPEC CHECKSUMS:
1223
SnapKit: 97b92857e3df3a0c71833cce143274bf6ef8e5eb
24+
Spring: 3d113f14575ef79aec9c5f906dfa4f5001c03254
1325

14-
PODFILE CHECKSUM: 9da3f7f71fe4fd4017a484fb6049e882cecf2bef
26+
PODFILE CHECKSUM: f1ac96bbd3eb3a771b0ae80271343cf6be59f1d5
1527

1628
COCOAPODS: 1.11.2

Pods/.DS_Store

2 KB
Binary file not shown.

Pods/Manifest.lock

+13-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Pods/Pods.xcodeproj/project.pbxproj

+481-178
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Pods/Pods.xcodeproj/xcuserdata/duxxless.xcuserdatad/xcschemes/xcschememanagement.plist

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Pods/Target Support Files/.DS_Store

0 Bytes
Binary file not shown.

Pods/Target Support Files/Pods-TimerApp/Pods-TimerApp-acknowledgements.markdown

+23
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Pods/Target Support Files/Pods-TimerApp/Pods-TimerApp-acknowledgements.plist

+29
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Pods/Target Support Files/Pods-TimerApp/Pods-TimerApp-frameworks-Debug-input-files.xcfilelist

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Pods/Target Support Files/Pods-TimerApp/Pods-TimerApp-frameworks-Debug-output-files.xcfilelist

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Pods/Target Support Files/Pods-TimerApp/Pods-TimerApp-frameworks-Release-input-files.xcfilelist

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Pods/Target Support Files/Pods-TimerApp/Pods-TimerApp-frameworks-Release-output-files.xcfilelist

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Pods/Target Support Files/Pods-TimerApp/Pods-TimerApp-frameworks.sh

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Pods/Target Support Files/Pods-TimerApp/Pods-TimerApp.debug.xcconfig

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Pods/Target Support Files/Pods-TimerApp/Pods-TimerApp.release.xcconfig

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

TimerApp.xcodeproj/xcuserdata/duxxless.xcuserdatad/xcschemes/xcschememanagement.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<key>TimerApp.xcscheme_^#shared#^_</key>
88
<dict>
99
<key>orderHint</key>
10-
<integer>2</integer>
10+
<integer>3</integer>
1111
</dict>
1212
</dict>
1313
</dict>

TimerApp/.DS_Store

0 Bytes
Binary file not shown.

TimerApp/ExtensionViewController.swift

+19-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
import UIKit
99

1010

11-
extension ViewController {
11+
extension ViewController: UIPickerViewDelegate, UIPickerViewDataSource, UITextFieldDelegate {
12+
13+
1214

1315
func setAlert() {
1416

@@ -22,4 +24,20 @@ extension ViewController {
2224
present(alert, animated: true)
2325
}
2426

27+
func numberOfComponents(in pickerView: UIPickerView) -> Int {
28+
return 1
29+
}
30+
31+
func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
32+
33+
return time.count
34+
}
35+
func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? {
36+
let currentTime = String(time[row])
37+
return currentTime
38+
}
39+
func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
40+
let currentTime = String(time[row])
41+
timerLabel.text = currentTime
42+
}
2543
}

0 commit comments

Comments
 (0)