added outlets and actions

This commit is contained in:
Andrew Case
2019-04-22 13:46:12 -04:00
committed by Aaron Helton
parent 3387d557c5
commit 990ab4d897
2 changed files with 27 additions and 4 deletions

View File

@@ -33,17 +33,28 @@
<rect key="frame" x="169" y="585" width="36" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="Clear"/>
<connections>
<action selector="clearPressed:" destination="Qye-JV-Pqh" eventType="touchUpInside" id="k3c-P9-NUQ"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="k0f-EI-Kte">
<rect key="frame" x="170" y="491" width="34" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="Start"/>
<connections>
<action selector="startStopPressed:" destination="Qye-JV-Pqh" eventType="touchUpInside" id="0V3-fL-bco"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<viewLayoutGuide key="safeArea" id="cf5-pJ-AmR"/>
</view>
<tabBarItem key="tabBarItem" title="Timer" id="btY-Uw-RMI"/>
<connections>
<outlet property="startStopButton" destination="k0f-EI-Kte" id="OT6-bi-f84"/>
<outlet property="timeLabel" destination="SOV-8m-KXd" id="hM0-Ka-UhC"/>
<outlet property="timePicker" destination="l0r-dF-pdB" id="VFa-sJ-uik"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Mav-Yg-pGe" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>

View File

@@ -10,8 +10,22 @@ import UIKit
class TimerViewController: UIViewController, UIPickerViewDataSource, UIPickerViewDelegate {
@IBAction func clearPressed(_ sender: UIButton) {
}
@IBAction func startStopPressed(_ sender: UIButton) {
}
@IBOutlet weak var startStopButton: UIButton!
@IBOutlet weak var timeLabel: UILabel!
@IBOutlet weak var timePicker: UIPickerView!
var times = [
[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24],[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60],[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60]
[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24],[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60],[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60]
]
func numberOfComponents(in pickerView: UIPickerView) -> Int {
@@ -29,9 +43,7 @@ class TimerViewController: UIViewController, UIPickerViewDataSource, UIPickerVie
// Do any additional setup after loading the view.
}
func pickerView(_ pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusing view: UIView?) -> UIView {
}
/*