Closed chrischenyc closed 10 years ago
Hi,
This is pretty easy to tweak with the existing code. In summary you need to switch off the Shine, switch off the Frame and switch off the Shadow. Then it looks like IOS7 as far as I can see.
What I did:
Added this code to .m file:
+ (CustomBadge*) customBadgeIOS7WithString:(NSString *)badgeString withScale:(CGFloat)scale {
return [[[self alloc] initWithString:badgeString withStringColor:[UIColor whiteColor] withInsetColor:[UIColor redColor] withBadgeFrame:NO withBadgeFrameColor:nil withScale:scale withShining:NO] autorelease];
}
This takes care of the first two items: Shine and Frame. To stop the Shadow just comment out this line in drawRoundedRectWithContext:
CGContextSetShadowWithColor(context, CGSizeMake(1.0,1.0), 3, [[UIColor blackColor] CGColor]);
The new version supports both: Prior iOS7 style and iOS7 or higher style.
can you add a solid colored style, like iOS 7 does...