Skip to content

Commit 6c0ae8e

Browse files
author
Erdem Inan
committed
Fix: Need to set up the status bar only if the KVNProgress is not already displayed
1 parent 0f22013 commit 6c0ae8e

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

KVNProgress/Classes/KVNProgress.m

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

401401
[UIView animateWithDuration:KVNLayoutAnimationDuration
402402
animations:^{
403-
[KVNBlockSelf setupUI];
403+
[KVNBlockSelf setupUI:NO];
404404
}];
405405

406406
KVNBlockSelf.showActionTrigerredDate = [NSDate date];
@@ -414,7 +414,7 @@ - (void)showProgress:(CGFloat)progress
414414
[self addToCurrentWindow];
415415
}
416416

417-
[self setupUI];
417+
[self setupUI:YES];
418418

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

534534
#pragma mark - UI
535535

536-
- (void)setupUI
536+
- (void)setupUI:(BOOL)needSetupStatusBar
537537
{
538-
[self setupStatusBar];
538+
if (needSetupStatusBar) {
539+
[self setupStatusBar];
540+
}
541+
539542
[self setupGestures];
540543
[self setupConstraints];
541544
[self setupCircleProgressView];

0 commit comments

Comments
 (0)