summaryrefslogtreecommitdiff
path: root/CyteKit
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-03-14 02:39:15 -0700
committerJay Freeman (saurik) <saurik@saurik.com>2011-03-14 05:09:11 -0700
commite8eda555ed7af2b5b11455c1db937e5f4b2c0e3e (patch)
treee3f5f91b35feb86480ef8270d285004cdd9ac241 /CyteKit
parentceed86247fa68805ac51e5fa12b7155126c3e2ca (diff)
Add -[CyteWebViewController setRequest:].
Diffstat (limited to 'CyteKit')
-rw-r--r--CyteKit/WebViewController.h1
-rw-r--r--CyteKit/WebViewController.mm8
2 files changed, 7 insertions, 2 deletions
diff --git a/CyteKit/WebViewController.h b/CyteKit/WebViewController.h
index b6cd768..d779468 100644
--- a/CyteKit/WebViewController.h
+++ b/CyteKit/WebViewController.h
@@ -102,6 +102,7 @@
- (CyteWebView *) webView;
+- (void) setRequest:(NSURLRequest *)request;
- (void) setURL:(NSURL *)url;
- (void) loadURL:(NSURL *)url cachePolicy:(NSURLRequestCachePolicy)policy;
diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm
index 4b2116f..d7a8594 100644
--- a/CyteKit/WebViewController.mm
+++ b/CyteKit/WebViewController.mm
@@ -167,9 +167,13 @@ float CYScrollViewDecelerationRateNormal;
];
}
-- (void) setURL:(NSURL *)url {
+- (void) setRequest:(NSURLRequest *)request {
_assert(request_ == nil);
- request_ = [self requestWithURL:url cachePolicy:NSURLRequestUseProtocolCachePolicy];
+ request_ = request;
+}
+
+- (void) setURL:(NSURL *)url {
+ [self setRequest:[self requestWithURL:url cachePolicy:NSURLRequestUseProtocolCachePolicy]];
}
- (void) loadURL:(NSURL *)url cachePolicy:(NSURLRequestCachePolicy)policy {