From baa2fba301cb1561e2c0bbc528027074ce73d692 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sun, 13 Mar 2011 13:27:45 -0700 Subject: [PATCH 1/1] Use a constructor, not +initialize. --- CyteKit/WebView.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CyteKit/WebView.mm b/CyteKit/WebView.mm index 363b9cb2..3ec751ab 100644 --- a/CyteKit/WebView.mm +++ b/CyteKit/WebView.mm @@ -355,7 +355,9 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se [[[self _documentView] webView] reloadFromOrigin:nil]; } -+ (void) initialize { +@end + +__attribute__((__constructor__)) static void $() { if (Class $UIWebViewWebViewDelegate = objc_getClass("UIWebViewWebViewDelegate")) { class_addMethod($UIWebViewWebViewDelegate, @selector(webView:addMessageToConsole:), (IMP) &$UIWebViewWebViewDelegate$webView$addMessageToConsole$, "v16@0:4@8@12"); class_addMethod($UIWebViewWebViewDelegate, @selector(webView:decidePolicyForNewWindowAction:request:newFrameName:decisionListener:), (IMP) &$UIWebViewWebViewDelegate$webView$decidePolicyForNewWindowAction$request$newFrameName$decisionListener$, "v28@0:4@8@12@16@20@24"); @@ -365,5 +367,3 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se class_addMethod($UIWebViewWebViewDelegate, @selector(webViewClose:), (IMP) &$UIWebViewWebViewDelegate$webViewClose$, "v12@0:4@8"); } } - -@end -- 2.45.2