試試這個: 將這個循環在你的按鈕的目標
for (UIView* subView in self.view.subviews)
{
if ([subView isKindOfClass:[UIButton class]]) // Put conditions using Tag Or name to check need to allow
[UIView animateWithDuration:0.25 animations:^{subView.alpha = 0.0;}];
}
你知道,有是完成交易委託:
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions
{
for (UIView* subView in self.view.subviews)
{
if ([subView isKindOfClass:[UIButton class]])
[UIView animateWithDuration:0.25 animations:^{subView.alpha = 1.0f;}];
}
}
注:我沒有測試。根據您的需求做一些更改
您發佈的代碼有什麼問題?什麼不起作用? – rckoenes
沒有得到你的問題,這太令人困惑 – svrushal
至少使用句號來完成聲明yaar :) – svrushal