草庐IT

cardButton

全部标签

ios - 如何删除某些状态下的 UIButton 图像?

我正在开发纸牌游戏。我希望卡片背面显示图像,卡片正面显示卡片内容。我已经让图像显示在背面,但我不知道如何在选择它时清除它。(所有run-this-code-when-it's-selected代码都在运行,所以我知道这不是不实际改变状态的问题。)这是我的代码:-(void)updateUI{for(UIButton*cardButtoninself.cardButtons){Card*card=[self.gamecardAtIndex:[self.cardButtonsindexOfObject:cardButton]];[cardButtonsetTitle:card.conten

ios - 如何删除某些状态下的 UIButton 图像?

我正在开发纸牌游戏。我希望卡片背面显示图像,卡片正面显示卡片内容。我已经让图像显示在背面,但我不知道如何在选择它时清除它。(所有run-this-code-when-it's-selected代码都在运行,所以我知道这不是不实际改变状态的问题。)这是我的代码:-(void)updateUI{for(UIButton*cardButtoninself.cardButtons){Card*card=[self.gamecardAtIndex:[self.cardButtonsindexOfObject:cardButton]];[cardButtonsetTitle:card.conten