請參考
https://github.com/jdg/MBProgressHUD
直接把
MBProgressHUD.h
MBProgressHUD.m
檔案夾到專案裡就可以使用
使用方式importMBProgressHUD.h
https://github.com/jdg/MBProgressHUD
直接把
MBProgressHUD.h
MBProgressHUD.m
檔案夾到專案裡就可以使用
使用方式importMBProgressHUD.h
[p[self showAllTextDialog:@"Email 格式錯誤"];
-(void)showAllTextDialog:(NSString *)str
{
MBProgressHUD *HUD = [[MBProgressHUD alloc] initWithView:self.view];
[self.view addSubview:HUD];
HUD.labelText = str;
HUD.mode = MBProgressHUDModeText;
//指定距离中心点的X轴和Y轴的位置,不指定则在屏幕中间显示
// HUD.yOffset = 100.0f;
// HUD.xOffset = 100.0f;
[HUD showAnimated:YES whileExecutingBlock:^{
sleep(1);
} completionBlock:^{
[HUD removeFromSuperview];
// [HUD release];
}];
}
全站熱搜
留言列表