From: Jay Freeman (saurik) Date: Sun, 18 Mar 2012 08:30:31 +0000 (+0000) Subject: I need to provide the style retrofit to all UIKit applications. X-Git-Tag: v0.9.3904~3 X-Git-Url: https://git.saurik.com/winterboard.git/commitdiff_plain/2cb720e94f9d325cff69241a4b25bb4bdd1516bf?hp=8f0ba4d830c95ff57fec56937ca89a6cfc1ef15c I need to provide the style retrofit to all UIKit applications. --- diff --git a/Library.mm b/Library.mm index 7c9c594..3904ea9 100644 --- a/Library.mm +++ b/Library.mm @@ -1941,10 +1941,6 @@ static CGSize NSString$sizeWithStyle$forWidth$(NSString *self, SEL _cmd, NSStrin } static void SBInitialize() { - class_addMethod($NSString, @selector(drawAtPoint:withStyle:), (IMP) &NSString$drawAtPoint$withStyle$, "v20@0:4{CGPoint=ff}8@16"); - class_addMethod($NSString, @selector(drawInRect:withStyle:), (IMP) &NSString$drawInRect$withStyle$, "v28@0:4{CGRect={CGSize=ff}{CGSize=ff}}8@24"); - class_addMethod($NSString, @selector(sizeWithStyle:forWidth:), (IMP) &NSString$sizeWithStyle$forWidth$, "{CGSize=ff}16@0:4@8f12"); - if (SummerBoard_) { WBRename(SBApplication, pathForIcon, pathForIcon); WBRename(SBApplicationIcon, icon, icon); @@ -2109,6 +2105,10 @@ MSInitialize { // }}} // UIKit {{{ if ([NSBundle bundleWithIdentifier:@"com.apple.UIKit"] != nil) { + class_addMethod($NSString, @selector(drawAtPoint:withStyle:), (IMP) &NSString$drawAtPoint$withStyle$, "v20@0:4{CGPoint=ff}8@16"); + class_addMethod($NSString, @selector(drawInRect:withStyle:), (IMP) &NSString$drawInRect$withStyle$, "v28@0:4{CGRect={CGSize=ff}{CGSize=ff}}8@24"); + class_addMethod($NSString, @selector(sizeWithStyle:forWidth:), (IMP) &NSString$sizeWithStyle$forWidth$, "{CGSize=ff}16@0:4@8f12"); + struct nlist nl[6]; memset(nl, 0, sizeof(nl)); nl[0].n_un.n_name = (char *) "__UIApplicationImageWithName";