From: Jay Freeman (saurik) Date: Mon, 21 Mar 2011 12:08:34 +0000 (-0700) Subject: Remove useless setView:UIView indirections. X-Git-Tag: v1.1.0%rc1~47 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/e8cbebe4629573be37e57211f797131696f0f2de Remove useless setView:UIView indirections. --- diff --git a/MobileCydia.mm b/MobileCydia.mm index 46d77c08..c6d98813 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -5776,16 +5776,12 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } - (void) loadView { - UIView *view([[[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]] autorelease]); - [view setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)]; - [self setView:view]; - - list_ = [[[UITableView alloc] initWithFrame:[[self view] bounds]] autorelease]; + list_ = [[[UITableView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]] autorelease]; [list_ setAutoresizingMask:UIViewAutoresizingFlexibleBoth]; [list_ setRowHeight:24.0f]; [(UITableView *) list_ setDataSource:self]; [list_ setDelegate:self]; - [view addSubview:list_]; + [self setView:list_]; } - (void) viewDidLoad { @@ -6229,13 +6225,9 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } - (void) loadView { - UIView *view([[[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]] autorelease]); - [view setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)]; - [self setView:view]; - - list_ = [[[UITableView alloc] initWithFrame:[[self view] bounds] style:UITableViewStylePlain] autorelease]; + list_ = [[[UITableView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame] style:UITableViewStylePlain] autorelease]; [list_ setAutoresizingMask:UIViewAutoresizingFlexibleBoth]; - [view addSubview:list_]; + [self setView:list_]; // XXX: is 20 the most optimal number here? [list_ setSectionIndexMinimumDisplayRowCount:20]; @@ -7329,16 +7321,12 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } - (void) loadView { - UIView *view([[[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]] autorelease]); - [view setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)]; - [self setView:view]; - - list_ = [[[UITableView alloc] initWithFrame:[[self view] bounds]] autorelease]; + list_ = [[[UITableView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]] autorelease]; [list_ setAutoresizingMask:UIViewAutoresizingFlexibleBoth]; [list_ setRowHeight:45.0f]; [(UITableView *) list_ setDataSource:self]; [list_ setDelegate:self]; - [view addSubview:list_]; + [self setView:list_]; } - (void) viewDidLoad { @@ -7513,16 +7501,12 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } - (void) loadView { - UIView *view([[[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]] autorelease]); - [view setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)]; - [self setView:view]; - - list_ = [[[UITableView alloc] initWithFrame:[[self view] bounds] style:UITableViewStylePlain] autorelease]; + list_ = [[[UITableView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame] style:UITableViewStylePlain] autorelease]; [list_ setAutoresizingMask:UIViewAutoresizingFlexibleBoth]; [list_ setRowHeight:73]; [(UITableView *) list_ setDataSource:self]; [list_ setDelegate:self]; - [view addSubview:list_]; + [self setView:list_]; } - (void) viewDidLoad { @@ -8513,16 +8497,12 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } - (void) loadView { - UIView *view([[[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]] autorelease]); - [view setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)]; - [self setView:view]; - - list_ = [[[UITableView alloc] initWithFrame:[[self view] bounds] style:UITableViewStylePlain] autorelease]; + list_ = [[[UITableView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame] style:UITableViewStylePlain] autorelease]; [list_ setAutoresizingMask:UIViewAutoresizingFlexibleBoth]; [list_ setRowHeight:53]; [(UITableView *) list_ setDataSource:self]; [list_ setDelegate:self]; - [view addSubview:list_]; + [self setView:list_]; } - (void) viewDidLoad { @@ -8663,15 +8643,11 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { @implementation SettingsController - (void) loadView { - UIView *view([[[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]] autorelease]); - [view setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)]; - [self setView:view]; - - table_ = [[[UITableView alloc] initWithFrame:[[self view] bounds] style:UITableViewStyleGrouped] autorelease]; + table_ = [[[UITableView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame] style:UITableViewStyleGrouped] autorelease]; [table_ setAutoresizingMask:UIViewAutoresizingFlexibleBoth]; [table_ setDelegate:self]; [(UITableView *) table_ setDataSource:self]; - [view addSubview:table_]; + [self setView:table_]; NSArray *items = [NSArray arrayWithObjects: UCLocalize("USER"),