From: Jay Freeman (saurik) Date: Sun, 18 Mar 2012 08:04:48 +0000 (+0000) Subject: Fix support for TimeStyle on iOS 4.x and 5.x. X-Git-Tag: v0.9.3904~4 X-Git-Url: https://git.saurik.com/winterboard.git/commitdiff_plain/8f0ba4d830c95ff57fec56937ca89a6cfc1ef15c Fix support for TimeStyle on iOS 4.x and 5.x. --- diff --git a/Library.mm b/Library.mm index 9a04fb5..7c9c594 100644 --- a/Library.mm +++ b/Library.mm @@ -121,6 +121,7 @@ MSClassHook(UIImage) MSMetaClassHook(UIImage) MSClassHook(UINavigationBar) MSClassHook(UIToolbar) +MSClassHook(UIStatusBarTimeItemView) MSClassHook(CKBalloonView) MSClassHook(CKMessageCell) @@ -854,6 +855,19 @@ MSInstanceMessageHook1(UIImage *, SBCalendarApplicationIcon, generateIconImage, return image; } +MSInstanceMessageHook1(UIImage *, UIStatusBarTimeItemView, contentsImageForStyle, int, style) { + WBStringDrawingState timeState = {NULL, 0, @"" + "color: white;" + , @"TimeStyle"}; + + stringDrawingState_ = &timeState; + + UIImage *image(MSOldCall(style)); + + stringDrawingState_ = NULL; + return image; +} + MSHook(void, SBCalendarIconContentsView$drawRect$, SBCalendarIconContentsView *self, SEL sel, CGRect rect) { NSBundle *bundle([NSBundle mainBundle]);