タイトルが「電卓」に設定されているボタンがあります。View Controller のこのボタンをタップすると、多数のオブジェクトが表示または非表示になり、ボタンのタイトルが「戻る」に変わります。
@IBAction func calculatorButtonTapped(sender: AnyObject) {
calculatorContainer.hidden = false
inspirationLabel.hidden = true
beginningLabel.hidden = true
menuExampleButton.hidden = true
aboutButton.hidden = true
calculatorButton.setTitle("Back", forState: UIControlState.Normal)
}
タイトルを「戻る」にして、そのボタンをクリックすると、隠していたものをすべて表示し、表示していたものをすべて隠したい。タイトルが「電卓」に設定されている場合、上記のコードからすべてが発生するようにします。これどうやってするの?