1
我有一个显示在uitableview中的歌曲标题以及“购买”按钮列表。当点击该按钮时,我显示MBProgressHUD.But有时它不被显示。同时它禁用用户交互作为它在下面的代码中。有时MBProgressHUD不显示
但是为什么有时不显示MBProgressHUD?
请让我知道,非常感谢。
下面是代码
-(void) buySong:(UIButton *)button
{
self.view.userInteractionEnabled = NO;
self.navigationController.navigationBar.userInteractionEnabled = NO;
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
hud.labelText = @"Proessing...";
hud.yOffset = -80;
UITableViewCell *cell = (UITableViewCell *)[[button superview] superview];
NSIndexPath *indexPath = [[self tblViewChildrenPoems] indexPathForCell:cell];
PSSongTags *songTags = [self.songsArray objectAtIndex:indexPath.row];
[ [PurchaseViewController sharedPurchaseManager] startPurchase:songTags];
}
感谢您的答复。和我的代码中有什么问题,请让我知道 – user198725878
我认为如果你使用navigationController,然后MBProgressHUD添加在self.navigationController.view,并且在你的代码中你没有设置代码。 –