diff --git a/MTStatusBarOverlay.h b/MTStatusBarOverlay.h index 5368b3d..742d520 100755 --- a/MTStatusBarOverlay.h +++ b/MTStatusBarOverlay.h @@ -91,8 +91,8 @@ typedef enum MTMessageType { BOOL hidesActivity_; // Image of gray Status Bar - UIImage *grayStatusBarImage_; - UIImage *grayStatusBarImageSmall_; + UIImage *defaultStatusBarImage_; + UIImage *defaultStatusBarImageShrinked_; // Animation-Type MTStatusBarOverlayAnimation animation_; @@ -140,6 +140,10 @@ typedef enum MTMessageType { @property (nonatomic, retain) UILabel *finishedLabel; // if this flag is set to YES, neither activityIndicator nor finishedLabel are shown @property (nonatomic, assign) BOOL hidesActivity; +// the image used when the Status Bar Style is Default +@property (nonatomic, retain) UIImage *defaultStatusBarImage; +// the image used when the Status Bar Style is Default and the Overlay is shrinked +@property (nonatomic, retain) UIImage *defaultStatusBarImageShrinked; // detect if status bar is currently shrinked @property (nonatomic, readonly, getter=isShrinked) BOOL shrinked; // detect if detailView is currently hidden diff --git a/MTStatusBarOverlay.m b/MTStatusBarOverlay.m index 8747ac3..558db0f 100755 --- a/MTStatusBarOverlay.m +++ b/MTStatusBarOverlay.m @@ -262,8 +262,6 @@ @interface MTStatusBarOverlay () @property (nonatomic, retain) UIActivityIndicatorView *activityIndicator; @property (nonatomic, retain) UIImageView *statusBarBackgroundImageView; -@property (nonatomic, retain) UIImage *grayStatusBarImage; -@property (nonatomic, retain) UIImage *grayStatusBarImageSmall; @property (nonatomic, retain) UILabel *statusLabel1; @property (nonatomic, retain) UILabel *statusLabel2; @property (nonatomic, assign) UILabel *hiddenStatusLabel; @@ -336,8 +334,8 @@ @implementation MTStatusBarOverlay @synthesize activityIndicator = activityIndicator_; @synthesize finishedLabel = finishedLabel_; @synthesize hidesActivity = hidesActivity_; -@synthesize grayStatusBarImage = grayStatusBarImage_; -@synthesize grayStatusBarImageSmall = grayStatusBarImageSmall_; +@synthesize defaultStatusBarImage = defaultStatusBarImage_; +@synthesize defaultStatusBarImageShrinked = grayStatusBarImageSmall_; @synthesize smallFrame = smallFrame_; @synthesize oldBackgroundViewFrame = oldBackgroundViewFrame_; @synthesize animation = animation_; @@ -436,7 +434,7 @@ - (id)initWithFrame:(CGRect)frame { // Image of gray status bar NSData *pngData = [NSData dataWithBytesNoCopy:statusBarBackgroundGrey_png length:statusBarBackgroundGrey_png_len freeWhenDone:NO]; - grayStatusBarImage_ = [[UIImage imageWithData:pngData] retain]; + defaultStatusBarImage_ = [[UIImage imageWithData:pngData] retain]; NSData *pngDataSmall = [NSData dataWithBytesNoCopy:statusBarBackgroundGreySmall_png length:statusBarBackgroundGreySmall_png_len freeWhenDone:NO]; grayStatusBarImageSmall_ = [[UIImage imageWithData:pngDataSmall] retain]; @@ -510,7 +508,7 @@ - (void)dealloc { [statusLabel2_ release], statusLabel2_ = nil; [activityIndicator_ release], activityIndicator_ = nil; [finishedLabel_ release], finishedLabel_ = nil; - [grayStatusBarImage_ release], grayStatusBarImage_ = nil; + [defaultStatusBarImage_ release], defaultStatusBarImage_ = nil; [grayStatusBarImageSmall_ release], grayStatusBarImageSmall_ = nil; [detailText_ release], detailText_ = nil; [detailTextView_ release], detailTextView_ = nil; @@ -1074,9 +1072,9 @@ - (void)setStatusBarBackgroundForStyle:(UIStatusBarStyle)style { if (style == UIStatusBarStyleDefault && !IsIPad && !IsIPhoneEmulationMode) { // choose image depending on size if (self.shrinked) { - self.statusBarBackgroundImageView.image = [self.grayStatusBarImageSmall stretchableImageWithLeftCapWidth:2.0f topCapHeight:0.0f]; + self.statusBarBackgroundImageView.image = [self.defaultStatusBarImageShrinked stretchableImageWithLeftCapWidth:2.0f topCapHeight:0.0f]; } else { - self.statusBarBackgroundImageView.image = [self.grayStatusBarImage stretchableImageWithLeftCapWidth:2.0f topCapHeight:0.0f]; + self.statusBarBackgroundImageView.image = [self.defaultStatusBarImage stretchableImageWithLeftCapWidth:2.0f topCapHeight:0.0f]; } }