]> git.saurik.com Git - cydia.git/commitdiff
Use actual types for fields rather than id (UISwitch and *TabBarController).
authorJay Freeman (saurik) <saurik@saurik.com>
Tue, 16 Nov 2010 22:07:21 +0000 (14:07 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Wed, 17 Nov 2010 18:02:59 +0000 (10:02 -0800)
MobileCydia.mm

index 151cae371787e57c8cabd34f74f5001dca9c9579..dc8cebd3e418633b3452f06e692184c6ef401e86 100644 (file)
@@ -4860,7 +4860,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     NSString *count_;
     UIImage *icon_;
     ContentView *content_;
-    id switch_;
+    UISwitch *switch_;
     BOOL editing_;
 }
 
@@ -4904,7 +4904,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 - (id) initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier {
     if ((self = [super initWithFrame:frame reuseIdentifier:reuseIdentifier]) != nil) {
         icon_ = [[UIImage applicationImageNamed:@"folder.png"] retain];
-        switch_ = [[objc_getClass("UISwitch") alloc] initWithFrame:CGRectMake(218, 9, 60, 25)];
+        switch_ = [[UISwitch alloc] initWithFrame:CGRectMake(218, 9, 60, 25)];
         [switch_ addTarget:self action:@selector(onSwitch:) forEvents:UIControlEventValueChanged];
 
         UIView *content([self contentView]);
@@ -7266,8 +7266,8 @@ freeing the view controllers on tab change */
     NSString *name_;
     Package *package_;
     UITableView *table_;
-    id subscribedSwitch_;
-    id ignoredSwitch_;
+    UISwitch *subscribedSwitch_;
+    UISwitch *ignoredSwitch_;
     UITableViewCell *subscribedCell_;
     UITableViewCell *ignoredCell_;
 }
@@ -7363,11 +7363,11 @@ freeing the view controllers on tab change */
         [table_ setAutoresizingMask:UIViewAutoresizingFlexibleBoth];
         [[self view] addSubview:table_];
 
-        subscribedSwitch_ = [[objc_getClass("UISwitch") alloc] initWithFrame:CGRectMake(0, 0, 50, 20)];
+        subscribedSwitch_ = [[UISwitch alloc] initWithFrame:CGRectMake(0, 0, 50, 20)];
         [subscribedSwitch_ setAutoresizingMask:UIViewAutoresizingFlexibleLeftMargin];
         [subscribedSwitch_ addTarget:self action:@selector(onSubscribed:) forEvents:UIControlEventValueChanged];
 
-        ignoredSwitch_ = [[objc_getClass("UISwitch") alloc] initWithFrame:CGRectMake(0, 0, 50, 20)];
+        ignoredSwitch_ = [[UISwitch alloc] initWithFrame:CGRectMake(0, 0, 50, 20)];
         [ignoredSwitch_ setAutoresizingMask:UIViewAutoresizingFlexibleLeftMargin];
         [ignoredSwitch_ addTarget:self action:@selector(onIgnored:) forEvents:UIControlEventValueChanged];
 
@@ -7955,11 +7955,12 @@ typedef enum {
     ConfirmationControllerDelegate,
     ProgressControllerDelegate,
     CydiaDelegate,
-    UINavigationControllerDelegate
+    UINavigationControllerDelegate,
+    UITabBarControllerDelegate
 > {
     UIWindow *window_;
     CYContainer *container_;
-    id tabbar_;
+    CYTabBarController *tabbar_;
 
     NSMutableArray *essential_;
     NSMutableArray *broken_;
@@ -8394,7 +8395,7 @@ static _finline void _setHomePage(Cydia *self) {
     return installed_;
 }
 
-- (void) tabBarController:(id)tabBarController didSelectViewController:(UIViewController *)viewController {
+- (void) tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController {
     int tag = [[viewController tabBarItem] tag];
     if (tag == tag_) {
         [(CYNavigationController *)[tabbar_ selectedViewController] popToRootViewControllerAnimated:YES];