bha*_*ath 0 progressdialog ios
我想将Android应用程序转换为iPhone.我设法获取服务器的内容,
NSString *s =[NSString stringWithFormat:@"www.xyz.com"];
NSURL *url = [NSURL URLWithString:s];
// NSLog(s);
NSString *content = [NSString stringWithContentsOfURL:url encoding:NSASCIIStringEncoding error:nil];
NSData *data = [content dataUsingEncoding:NSUTF8StringEncoding];
NSDictionary *response = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:nil];
Run Code Online (Sandbox Code Playgroud)
但是,如何使用旋转微调器获取进度对话框直到它加载.请帮助和帮助.
小智 5
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
hud.mode = MBProgressHUDModeAnnularDeterminate;
hud.labelText = @"Loading";
[self doSomethingInBackgroundWithProgressCallback:^(float progress) {
hud.progress = progress;
} completionCallback:^{
[hud hide:YES];
}];
you have add this code
Run Code Online (Sandbox Code Playgroud)
从https://github.com/jdg/MBProgressHUD下载源代码
| 归档时间: |
|
| 查看次数: |
3495 次 |
| 最近记录: |