Skip to content

Commit

Permalink
Remove debug logs for fixing #29
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-hirsch committed Mar 8, 2015
1 parent 6139b95 commit 6d14e28
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions KVNProgress/Classes/KVNProgress.m
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,6 @@ - (void)showProgress:(CGFloat)progress
{
KVNPrepareBlockSelf();

NSLog(@"===== SHOWING HUD");

// We check if a previous HUD is displaying
// If so, we wait its minimum display time before switching to the new one
// But, if we are changing from an indeterminate progress HUD to a determinate one,
Expand Down Expand Up @@ -444,8 +442,6 @@ - (void)showProgress:(CGFloat)progress
[KVNBlockSelf.class dismissWithCompletion:completion];
});
}

NSLog(@"===== FINISH SHOWING HUD");
}

#pragma mark - Dimiss
Expand All @@ -457,18 +453,12 @@ + (void)dismiss

+ (void)dismissWithCompletion:(KVNCompletionBlock)completion
{
NSLog(@"==== DISMISSING HUD");
if ([self sharedView].state == KVNProgressStateHidden) {
NSLog(@"= HUD is already hidden");

return;
} else if ([self sharedView].state == KVNProgressStateAppearing) {
[self sharedView].state = KVNProgressStateDismissing;
[self endDismissWithCompletion:completion];

NSLog(@"= HUD was appearing");
NSLog(@"==== FINISH DISMISSING HUD");

return;
}

Expand Down Expand Up @@ -509,7 +499,6 @@ + (void)dismissAnimatedWithCompletion:(KVNCompletionBlock)completion
} completion:^(BOOL finished) {
if(progressView.alpha == 0 || progressView.contentView.alpha == 0) {
[self endDismissWithCompletion:completion];
NSLog(@"==== FINISH DISMISSING HUD");
}
}];
}
Expand Down Expand Up @@ -546,15 +535,11 @@ + (void)endDismissWithCompletion:(KVNCompletionBlock)completion

- (void)setupUI
{
NSLog(@"==== SETTING UI");

[self setupGestures];
[self setupConstraints];
[self setupCircleProgressView];
[self setupStatus:self.status];
[self setupBackground];

NSLog(@"==== FINISH SETTING UI");
}

- (void)setupGestures
Expand All @@ -571,16 +556,10 @@ - (void)setupGestures

- (void)setupConstraints
{
NSLog(@"===== SETTING BASE CONSTRAINTS");

CGRect bounds = [self correctedBounds];
CGFloat statusInset = (self.status.length > 0) ? KVNContentViewWithStatusInset : KVNContentViewWithoutStatusInset;
CGFloat contentWidth;

NSLog(@"= bounds: %@", NSStringFromCGRect(bounds));
NSLog(@"= statusInset: %f", statusInset);
NSLog(@"= fullScreen: %d", [self isFullScreen]);

if (!KVNSystemVersionGreaterOrEqual_iOS_8 && [self.superview isKindOfClass:UIWindow.class]) {
self.transform = CGAffineTransformMakeRotation([self rotationForStatusBarOrientation]);
} else {
Expand All @@ -601,15 +580,11 @@ - (void)setupConstraints
}
}

NSLog(@"= contentWidth: %f", contentWidth);

self.circleProgressViewTopToSuperViewConstraint.constant = statusInset;
self.statusLabelBottomToSuperViewConstraint.constant = statusInset;
self.contentViewWidthConstraint.constant = contentWidth;

[self layoutIfNeeded];

NSLog(@"===== FINISH SETTING BASE CONSTRAINTS");
}

- (void)setupCircleProgressView
Expand Down Expand Up @@ -827,12 +802,7 @@ - (void)addToCurrentWindow

- (void)addToView:(UIView *)superview
{
NSLog(@"===== ADDING TO SUPERVIEW: %@", superview);
NSLog(@"= superview bounds: %@", NSStringFromCGRect(superview.bounds));

if (self.superview) {
NSLog(@"= Removing constraints from previous HUD superview");
NSLog(@"= Removing HUD from previous superview");
[self.superview removeConstraints:self.constraintsToSuperview];
[self removeFromSuperview];
}
Expand Down Expand Up @@ -861,21 +831,15 @@ - (void)addToView:(UIView *)superview

// Fix for non autolayout project
self.frame = superview.bounds;

NSLog(@"===== FINISH ADDING TO SUPERVIEW: %@", superview);
}

#pragma mark - Update

- (void)updateUIForOrientation
{
NSLog(@"===== UPDATING UI FOR ORIENTATION: %ld", [UIApplication sharedApplication].statusBarOrientation);

[self setupConstraints];
[self updateStatusConstraints];
[self updateBackgroundConstraints];

NSLog(@"===== FINISH UPDATING UI FOR ORIENTATION: %ld", [UIApplication sharedApplication].statusBarOrientation);
}

- (void)updateBackground
Expand Down Expand Up @@ -936,8 +900,6 @@ - (void)updateBackground

- (void)updateBackgroundConstraints
{
NSLog(@"===== UPDATING BACKGROUND CONSTRAINTS");

if (![self isFullScreen] && self.status.length == 0) {
self.circleProgressViewTopToSuperViewConstraint.constant = KVNContentViewWithoutStatusInset;
self.statusLabelBottomToSuperViewConstraint.constant = KVNContentViewWithoutStatusInset;
Expand All @@ -946,12 +908,6 @@ - (void)updateBackgroundConstraints
CGSize fittingSize = [self.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize];
self.contentViewWidthConstraint.constant = fittingSize.height;
}

NSLog(@"= fullScreen: %d", [self isFullScreen]);
NSLog(@"= status: %@", self.status);
NSLog(@"= contentViewWidth: %f", self.contentViewWidthConstraint.constant);

NSLog(@"===== FINISH UPDATING BACKGROUND CONSTRAINTS");
}

+ (void)updateStatus:(NSString*)status
Expand Down

0 comments on commit 6d14e28

Please sign in to comment.