From 68bd7c60c69be8fbf1d8a5ef7dc8ca62883351a5 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 21 Mar 2011 16:31:51 -0700 Subject: Add initWithRequest: to CyteWebViewController. --- CyteKit/WebViewController.h | 3 +++ CyteKit/WebViewController.mm | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/CyteKit/WebViewController.h b/CyteKit/WebViewController.h index 8798803..cb9af97 100644 --- a/CyteKit/WebViewController.h +++ b/CyteKit/WebViewController.h @@ -112,7 +112,10 @@ - (void) reloadURL; - (id) init; + - (id) initWithURL:(NSURL *)url; +- (id) initWithRequest:(NSURLRequest *)request; + - (id) initWithWidth:(float)width; - (id) initWithWidth:(float)width ofClass:(Class)_class; diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm index a38a8d0..3e77a51 100644 --- a/CyteKit/WebViewController.mm +++ b/CyteKit/WebViewController.mm @@ -939,6 +939,12 @@ float CYScrollViewDecelerationRateNormal; } return self; } +- (id) initWithRequest:(NSURLRequest *)request { + if ((self = [self init]) != nil) { + [self setRequest:request]; + } return self; +} + - (void) callFunction:(WebScriptObject *)function { WebThreadLocked lock; -- cgit v1.2.3