Skip to content

Commit

Permalink
setNeedsDisplay if blend mode changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kgn committed Sep 12, 2012
1 parent ac1c7b9 commit 0a3622d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions KGNoise.m
Expand Up @@ -111,6 +111,17 @@ - (void)setNoiseOpacity:(CGFloat)noiseOpacity{
}
}

- (void)setNoiseBlendMode:(CGBlendMode)noiseBlendMode{
if(_noiseBlendMode != noiseBlendMode){
_noiseBlendMode = noiseBlendMode;
#if TARGET_OS_IPHONE
[self setNeedsDisplay];
#else
[self setNeedsDisplay:YES];
#endif
}
}

#if TARGET_OS_IPHONE
- (void)drawRect:(CGRect)dirtyRect{
CGContextRef context = UIGraphicsGetCurrentContext();
Expand Down

0 comments on commit 0a3622d

Please sign in to comment.