Skip to content

Commit

Permalink
Merge pull request #36 from jurysch/master
Browse files Browse the repository at this point in the history
Clean up Xcode warnings, remove unused drawRect boilerplate
  • Loading branch information
Brandon McQuilkin committed Jul 16, 2014
2 parents ea5c49f + 4fbb09c commit 98a2b35
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Classes/HUD/UIImage+ImageEffects.m
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ - (UIImage *)applyTintEffectWithColor:(UIColor *)tintColor
{
const CGFloat EffectColorAlpha = 0.6;
UIColor *effectColor = tintColor;
int componentCount = CGColorGetNumberOfComponents(tintColor.CGColor);
NSInteger componentCount = CGColorGetNumberOfComponents(tintColor.CGColor);
if (componentCount == 2) {
CGFloat b;
if ([tintColor getWhite:&b alpha:NULL]) {
Expand Down Expand Up @@ -200,7 +200,7 @@ - (UIImage *)applyBlurWithRadius:(CGFloat)blurRadius tintColor:(UIColor *)tintCo
// ... if d is odd, use three box-blurs of size 'd', centered on the output pixel.
//
CGFloat inputRadius = blurRadius * [[UIScreen mainScreen] scale];
NSUInteger radius = floor(inputRadius * 3. * sqrt(2 * M_PI) / 4 + 0.5);
unsigned int radius = floor(inputRadius * 3. * sqrt(2 * M_PI) / 4 + 0.5);
if (radius % 2 != 1) {
radius += 1; // force radius to be odd so that the three box-blur methodology works.
}
Expand Down
9 changes: 0 additions & 9 deletions Classes/ProgressViews/M13ProgressView.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,4 @@ - (void)performAction:(M13ProgressViewAction)action animated:(BOOL)animated
//To be overriden in subclasses
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
// Drawing code
}
*/

@end
2 changes: 2 additions & 0 deletions Classes/ProgressViews/M13ProgressViewImage.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ @interface M13ProgressViewImage ()

@implementation M13ProgressViewImage

@dynamic progress;

#pragma mark Initalization and setup

- (id)init
Expand Down
2 changes: 2 additions & 0 deletions Classes/ProgressViews/M13ProgressViewPie.m
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ @implementation M13ProgressViewPie
BOOL _backgroundRingWidthOverriden;
}

@dynamic progress;

#pragma mark Initalization and setup

- (id)init
Expand Down
6 changes: 4 additions & 2 deletions Classes/ProgressViews/M13ProgressViewSegmentedBar.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ @interface M13ProgressViewSegmentedBar ()

@implementation M13ProgressViewSegmentedBar
{
int indeterminateIndex;
NSInteger indeterminateIndex;
NSTimer *indeterminateTimer;
}

@dynamic progress;

#pragma mark Initalization and setup

- (id)init
Expand Down Expand Up @@ -465,7 +467,7 @@ - (void)drawIndeterminate
cornerRadius = floorf(self.bounds.size.height < segmentWidth ? self.bounds.size.height / 2.0 : segmentWidth / 2.0);
}
//What index will the segments be colored from.
int numberOfSegmentsToBeColored = _numberOfSegments / 4;
NSInteger numberOfSegmentsToBeColored = _numberOfSegments / 4;
//Create the path ref that all the paths will be appended
CGMutablePathRef progressPathRef = CGPathCreateMutable();
CGMutablePathRef backgroundPathRef = CGPathCreateMutable();
Expand Down
2 changes: 2 additions & 0 deletions Classes/ProgressViews/M13ProgressViewSegmentedRing.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ @implementation M13ProgressViewSegmentedRing
CGFloat _segmentSeparationInnerAngle;
}

@dynamic progress;

#pragma mark Initalization and setup

- (id)init
Expand Down
2 changes: 2 additions & 0 deletions Classes/ProgressViews/M13ProgressViewStripedBar.m
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ @implementation M13ProgressViewStripedBar
UIColor *_currentColor;
}

@dynamic progress;

#pragma mark Initalization and setup

- (id)init
Expand Down

0 comments on commit 98a2b35

Please sign in to comment.