Please note, this blog entry is from a previous course. You might want to check out the current one.
Disable the game play mode control (i.e. the UISwitch or UISegmentedControl from Required Task 3) when a game starts (i.e. when the first flip of a game happens) and re-enable it when a re-deal happens (i.e. the Deal button is pressed).
Disable the control when a card is touched, and re-enable it again when hitting the deal button:
- (IBAction)touchDealButton:(UIButton *)sender { self.modeSelector.enabled = YES; ... } - (IBAction)touchCardButton:(UIButton *)sender { self.modeSelector.enabled = NO; ... }
The complete code is available on github.