if( [[favbutton imageForState:UIControlStateNormal] isEqual:[UIImage imageNamed:@"wishlwhite.png"]])
{
[favbutton setImage:[UIImage imageNamed:@"wishlistwhite.png"] forState:UIControlStateNormal];
// other statements
}
else
{
[favbutton setImage:[UIImage imageNamed:@"wishlwhite.png"] forState:UIControlStateNormal];
// other statements
}
答案 0 :(得分:0)
你真的不应该检查按钮中的图像来确定状态。声明要测试的单独属性,例如
body-parser