我需要显示活动指标,但无法找到正确的方法,我尝试的是:
- In ViewDidLoad
[self-performSelectOnMainThread:@selector(setupActivityIndicator)withObject:nil waitUntilDone:NO]代码>
[self-userDataFromServer]
;
[self-performSelectionOnMainThread:@selector(stopActivityIndicatorInMainThread)withObject:nil waitUntilDone:NO]
----或者-----
- In ViewDidLoad
[self-startActivityIndicator]代码>
[self-userDataFromServer]
;
[self-stopActivityIndicator]代码>
两人都在以这种不正确的方式工作。我们如何在并行线程上使用activityindicator?