woo*_*cle 1 iphone sdk xcode uiprogressview ios
我遇到了MBProgressHUD和DSActivityView,以在iPhone应用程序上显示黑色圆角"加载"类型叠加.
我只是想知道是否有人知道如何扩展其中任何一个以检测覆盖的轻击,以便可以取消该操作.
我看过至少有一个有"加载"指示的应用程序.但随着文本"点击取消".
谢谢!
use*_*657 26
- (void)showHUDWithCancel:(NSString *)aMessage {
self.HUD = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
self.HUD.labelText = aMessage;
self.HUD.detailsLabelText = @"Tap to cancel";
[self.HUD addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hudWasCancelled)]];
}
- (void)hudWasCancelled {
[self.HUD hide:YES];
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5718 次 |
| 最近记录: |