Sha256: df632a85bfc0b1ceedbc990bee1c881f71b2e126aeac36366089265488ed7b95
Contents?: true
Size: 1.94 KB
Versions: 2
Compression:
Stored size: 1.94 KB
Contents
/* CustomBadge.h *** Description: *** With this class you can draw a typical iOS badge indicator with a custom text on any view. Please use the allocator customBadgeWithString the create a new badge. In this version you can modfiy the color inside the badge (insetColor), the color of the frame (frameColor), the color of the text and you can tell the class if you want a frame around the badge. *** License & Copyright *** Created by Sascha Marc Paulus www.spaulus.com on 04/2011. Version 2.0 This tiny class can be used for free in private and commercial applications. Please feel free to modify, extend or distribution this class. If you modify it: Please send me your modified version of the class. A commercial distribution of this class is not allowed. If you have any questions please feel free to contact me (open@spaulus.com). */ #import <UIKit/UIKit.h> #import <QuartzCore/QuartzCore.h> @interface CustomBadge : UIView { NSString *badgeText; UIColor *badgeTextColor; UIColor *badgeInsetColor; UIColor *badgeFrameColor; BOOL badgeFrame; BOOL badgeShining; CGFloat badgeCornerRoundness; CGFloat badgeScaleFactor; } @property(nonatomic,strong) NSString *badgeText; @property(nonatomic,strong) UIColor *badgeTextColor; @property(nonatomic,strong) UIColor *badgeInsetColor; @property(nonatomic,strong) UIColor *badgeFrameColor; @property(nonatomic,readwrite) BOOL badgeFrame; @property(nonatomic,readwrite) BOOL badgeShining; @property(nonatomic,readwrite) CGFloat badgeCornerRoundness; @property(nonatomic,readwrite) CGFloat badgeScaleFactor; + (CustomBadge*) customBadgeWithString:(NSString *)badgeString; + (CustomBadge*) customBadgeWithString:(NSString *)badgeString withStringColor:(UIColor*)stringColor withInsetColor:(UIColor*)insetColor withBadgeFrame:(BOOL)badgeFrameYesNo withBadgeFrameColor:(UIColor*)frameColor withScale:(CGFloat)scale withShining:(BOOL)shining; - (void) autoBadgeSizeWithString:(NSString *)badgeString; @end
Version data entries
2 entries across 2 versions & 1 rubygems