From abe7a1b1c64fa4293d471d989730498b83aaed4a Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Fri, 15 May 2015 21:21:24 -0700 Subject: [PATCH] show spinner immediately in preview --- Blog/PreviewViewController.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Blog/PreviewViewController.m b/Blog/PreviewViewController.m index 42c644a..6ad01fd 100644 --- a/Blog/PreviewViewController.m +++ b/Blog/PreviewViewController.m @@ -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;