summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-03-08 13:12:26 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2011-03-08 13:12:26 -0800
commit61cc4dbc49f9dfb638eb01522a392cbfa71a0cc2 (patch)
tree43787dc4c0a7d0c1ca5a820d07f6e42ab23db90f
parentbf965437e402b48cc49995a6f251144f4d9ffbba (diff)
Use loadView/releaseSubviews for PackageListController.
-rw-r--r--MobileCydia.mm26
1 files changed, 17 insertions, 9 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index f5420af..01a4338 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -5877,19 +5877,27 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
packages_ = [NSArray array];
sections_ = [NSMutableArray arrayWithCapacity:16];
+ } return self;
+}
- list_ = [[[UITableView alloc] initWithFrame:[[self view] bounds] style:UITableViewStylePlain] autorelease];
- [list_ setAutoresizingMask:UIViewAutoresizingFlexibleBoth];
- [[self view] addSubview:list_];
+- (void) loadView {
+ [self setView:[[[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]] autorelease]];
- // XXX: is 20 the most optimal number here?
- [list_ setSectionIndexMinimumDisplayRowCount:20];
+ list_ = [[[UITableView alloc] initWithFrame:[[self view] bounds] style:UITableViewStylePlain] autorelease];
+ [list_ setAutoresizingMask:UIViewAutoresizingFlexibleBoth];
+ [[self view] addSubview:list_];
- [(UITableView *) list_ setDataSource:self];
- [list_ setDelegate:self];
+ // XXX: is 20 the most optimal number here?
+ [list_ setSectionIndexMinimumDisplayRowCount:20];
- [self updateHeight];
- } return self;
+ [(UITableView *) list_ setDataSource:self];
+ [list_ setDelegate:self];
+
+ [self updateHeight];
+}
+
+- (void) releaseSubviews {
+ list_ = nil;
}
- (void) setDelegate:(id)delegate {