mirror of
https://github.com/samsonjs/samhuri.net-ios.git
synced 2026-03-25 09:25:47 +00:00
show spinner immediately in preview
This commit is contained in:
parent
2cb9adf357
commit
abe7a1b1c6
1 changed files with 4 additions and 3 deletions
|
|
@ -49,13 +49,14 @@
|
|||
[super viewWillAppear:animated];
|
||||
|
||||
if (self.initialRequest) {
|
||||
[self.centerIndicatorView startAnimating];
|
||||
[self.cornerIndicatorView stopAnimating];
|
||||
self.webView.hidden = YES;
|
||||
|
||||
PMKPromise *p = self.promise ?: [PMKPromise promiseWithValue:nil];
|
||||
__weak typeof(self) welf = self;
|
||||
p.then(^{
|
||||
typeof(self) self = welf;
|
||||
[self.centerIndicatorView startAnimating];
|
||||
[self.cornerIndicatorView stopAnimating];
|
||||
self.webView.hidden = YES;
|
||||
[self.webView loadRequest:self.initialRequest];
|
||||
}).finally(^{
|
||||
typeof(self) self = welf;
|
||||
|
|
|
|||
Loading…
Reference in a new issue