Skip to content

Commit 0f1aa74

Browse files
committed
Merge pull request #62 from erdemPinch/master
Fix: Need to set up the status bar only if the KVNProgress is not already displayed
2 parents dc43816 + 6c0ae8e commit 0f1aa74

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

KVNProgress/Classes/KVNProgress.m

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ - (void)showProgress:(CGFloat)progress
403403

404404
[UIView animateWithDuration:KVNLayoutAnimationDuration
405405
animations:^{
406-
[KVNBlockSelf setupUI];
406+
[KVNBlockSelf setupUI:NO];
407407
}];
408408

409409
KVNBlockSelf.showActionTrigerredDate = [NSDate date];
@@ -417,7 +417,7 @@ - (void)showProgress:(CGFloat)progress
417417
[self addToCurrentWindow];
418418
}
419419

420-
[self setupUI];
420+
[self setupUI:YES];
421421

422422
// FIXME: find a way to wait for the views to be added to the window before launching the animations
423423
// (Fix to make the animations work fine)
@@ -537,9 +537,12 @@ + (void)endDismissWithCompletion:(KVNCompletionBlock)completion
537537

538538
#pragma mark - UI
539539

540-
- (void)setupUI
540+
- (void)setupUI:(BOOL)needSetupStatusBar
541541
{
542-
[self setupStatusBar];
542+
if (needSetupStatusBar) {
543+
[self setupStatusBar];
544+
}
545+
543546
[self setupGestures];
544547
[self setupConstraints];
545548
[self setupCircleProgressView];

0 commit comments

Comments
 (0)