mirror of
https://github.com/samsonjs/samhuri.net-ios.git
synced 2026-04-27 15:07:44 +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];
|
[super viewWillAppear:animated];
|
||||||
|
|
||||||
if (self.initialRequest) {
|
if (self.initialRequest) {
|
||||||
|
[self.centerIndicatorView startAnimating];
|
||||||
|
[self.cornerIndicatorView stopAnimating];
|
||||||
|
self.webView.hidden = YES;
|
||||||
|
|
||||||
PMKPromise *p = self.promise ?: [PMKPromise promiseWithValue:nil];
|
PMKPromise *p = self.promise ?: [PMKPromise promiseWithValue:nil];
|
||||||
__weak typeof(self) welf = self;
|
__weak typeof(self) welf = self;
|
||||||
p.then(^{
|
p.then(^{
|
||||||
typeof(self) self = welf;
|
typeof(self) self = welf;
|
||||||
[self.centerIndicatorView startAnimating];
|
|
||||||
[self.cornerIndicatorView stopAnimating];
|
|
||||||
self.webView.hidden = YES;
|
|
||||||
[self.webView loadRequest:self.initialRequest];
|
[self.webView loadRequest:self.initialRequest];
|
||||||
}).finally(^{
|
}).finally(^{
|
||||||
typeof(self) self = welf;
|
typeof(self) self = welf;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue