这是MBProgressHUD的简单使用代码
// Add at the top of the file
#import "MBProgressHUD.h"
// Add right before return TRUE in textFieldShouldReturn
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
hud.labelText = @"Redeeming code...";
// Add at start of requestFinished AND requestFailed
[MBProgressHUD hideHUDForView:self.view animated:YES];
显然我们需要一个视图来添加 MBProgressHUD。
问题是cocos2d中没有view,只有CCNode。
那么,有没有办法解决这个问题呢?
通过将 UIview 添加到 CCLayer 上?
如果这是一个愚蠢的问题,请接受我的道歉,因为我还是编程新手。