summaryrefslogtreecommitdiff
path: root/UICaboodle/RVPage.mm
diff options
context:
space:
mode:
authorGrant Paul <chpwn@chpwn.com>2011-02-11 23:27:43 -0800
committerGrant Paul <chpwn@chpwn.com>2011-02-11 23:27:43 -0800
commit35f0a3b5de5a22872f7fbd96183f510a5ad80aa0 (patch)
tree0de40ea9ad9f05a88e29ae905856016dfb31786b /UICaboodle/RVPage.mm
parent32102f847292d56cf80f125eaea743f246c048a7 (diff)
parent36fa2ea5375250c9059b83ecd7bd05af56730fa9 (diff)
Move -init into -loadView -viewDidLoad and friends, as Apple wants. Add -navigationURL and persistance (15 minute timeout) of Cydia sessions, with full lazy-loading of view controllers. Still failed to fix the URL->blackscreen bug, although now it just shows the wrong tab instaed of a black screen (really, WTF, UITabBarController?)
Diffstat (limited to 'UICaboodle/RVPage.mm')
-rw-r--r--UICaboodle/RVPage.mm43
1 files changed, 43 insertions, 0 deletions
diff --git a/UICaboodle/RVPage.mm b/UICaboodle/RVPage.mm
index 3e6e692..05a1e25 100644
--- a/UICaboodle/RVPage.mm
+++ b/UICaboodle/RVPage.mm
@@ -7,13 +7,56 @@
extern bool IsWildcat_;
+@implementation UIViewController (Cydia)
+
+- (BOOL) hasLoaded {
+ return YES;
+}
+
+@end
+
@implementation CYViewController
+
- (void) setDelegate:(id)delegate {
delegate_ = delegate;
}
+
+- (id) delegate {
+ return delegate_;
+}
+
+- (void) viewWillAppear:(BOOL)animated {
+ [super viewWillAppear:animated];
+
+ if (![self hasLoaded])
+ [self reloadData];
+}
+
+- (BOOL) hasLoaded {
+ return loaded_;
+}
+
+- (void) releaseSubviews {
+ // Do nothing.
+}
+
+- (void) setView:(UIView *)view {
+ if (view == nil)
+ [self releaseSubviews];
+
+ [super setView:view];
+}
+
- (void) reloadData {
+ loaded_ = YES;
+}
+
+- (NSURL *) navigationURL {
+ return nil;
}
+
- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation {
return IsWildcat_ || orientation == UIInterfaceOrientationPortrait;
}
+
@end