gpt4 book ai didi

IOS 进度对话框

转载 作者:行者123 更新时间:2023-11-28 18:35:31 25 4
gpt4 key购买 nike

我想将 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];

但是,如何使用旋转微调器获取进度对话框直到它加载。请帮助和义务。

最佳答案

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

https://github.com/jdg/MBProgressHUD下载源码

关于IOS 进度对话框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19900959/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com