diff --git a/.DS_Store b/.DS_Store index 5e564f4..7995e47 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/EBBannerView/Classes/EBBannerView+Categories.m b/EBBannerView/Classes/EBBannerView+Categories.m index fefb246..eba3f40 100644 --- a/EBBannerView/Classes/EBBannerView+Categories.m +++ b/EBBannerView/Classes/EBBannerView+Categories.m @@ -76,6 +76,7 @@ +(UIColor *)colorAtPoint:(CGPoint)point{ CGImageRef cgImage = viewImage.CGImage; NSUInteger width = viewImage.size.width; NSUInteger height = viewImage.size.height; + viewImage = nil; CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); int bytesPerPixel = 4; int bytesPerRow = bytesPerPixel * 1; @@ -86,6 +87,7 @@ +(UIColor *)colorAtPoint:(CGPoint)point{ CGContextSetBlendMode(context, kCGBlendModeCopy); CGContextTranslateCTM(context, -pointX, pointY-(CGFloat)height); CGContextDrawImage(context, CGRectMake(0.0f, 0.0f, (CGFloat)width, (CGFloat)height), cgImage); + UIGraphicsEndImageContext(); CGContextRelease(context); CGFloat red = (CGFloat)pixelData[0] / 255.0f; CGFloat green = (CGFloat)pixelData[1] / 255.0f; diff --git a/demo/demo.xcworkspace/xcuserdata/wxc.xcuserdatad/UserInterfaceState.xcuserstate b/demo/demo.xcworkspace/xcuserdata/wxc.xcuserdatad/UserInterfaceState.xcuserstate index e268ef9..6dbe5a0 100644 Binary files a/demo/demo.xcworkspace/xcuserdata/wxc.xcuserdatad/UserInterfaceState.xcuserstate and b/demo/demo.xcworkspace/xcuserdata/wxc.xcuserdatad/UserInterfaceState.xcuserstate differ