类GameViewController:UIViewController中,UIPopoverPresentationControllerDelegate {保存的UIButton状态
@IBOutlet weak var instructions: UIButton!
@IBAction func instructions(_ sender: AnyObject) {
instructions.isHidden = true
}
这是我的代码来显示如何使用应用程序的指令。 我目前有一个图像按钮,当我点击它时,图像消失。这很好,但我不希望说明弹出加班时有人打开应用程序。我想使用“Userdefaults”来保存按钮的状态。 我刚刚更新到swift 3.0,我无法找到解释如何解决问题的人,请帮忙!
你是指控制状态? –
或者你想保存按钮隐藏状态? –