swift3 實作-年輕人買房條件app (利用pickerView,Timer,UISwitch,UISlider,segmentIndex,isHidden,progress)

my final project

(1)use “pickerView” item to show navigator style

1.viewcontroller must first inherit UIPickerViewDelegate and UIPickerViewDataSource

2.set array content & choosecar

3.set a variable to receive

4.implementation UIPickerViewDelegate and UIPickerViewDataSource protocol

note1: in didSelectRow function , use chooseCareer to receive careerOption’s content , if row is 4,careerOption[row] will equal “ios工程師” and deliver content to chooseCareer

note2: numberOfcomponents function return 1 mean ,like set pickerview content is 1 section

note3: titleForRow function mean that what content in row you want to set

5.determine if

6. set Delegate and DataSource = self

7.pickerview had all done

(2)use Timer & progress

1.

2. per o.5 second will run progressAdd function

3. progress.progress will show the status until mytimer equal = 1 then mytimer will invalidate

progress

(3) use UISwitch

(4)use UISlider

1.use moneyShow to receive income.value , due to income’s value is Float type so first need to transfer to Int to catch integer and then change to String

2.set the UISlider initial value

(5)use segmentIndex

(6)use .isHidden property

componet like UIprogress,UISegmentedControl,UILabel has .is.isHidden property


Also published on Medium.

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *