7th Week of Swift — UI View Controller


Make connection from UIs in storyboard to controller that controller can control the UIs.

By adding lines from storyboard to controller in the {} of class. (Not in function)

Delet IBOutline

  • Must delete from both in assistant editor and outline.

Buttom (Connect buttom to the assistant editor)

1.Set Connection in Action

2.Choose Event to Touch Up Inside means once the finger touch inside the area and leave the screen, then execute the function

Check whether all the connection between storyboard and assistant editor are well connected.

Hide the segmented Control in the beginning

By wirting answer.isHidden = false to display this segmentedControl:

answer.istHidden = false

Control the SegmentedControl ( 0 means from the leftist button, here 0 means “就是你”

answer.selectedSegmentIndex = 0
One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.