1
我试图改变InAppSettingKit视图控制器的背景颜色。定制的iOS InAppSettingsKit给出了iPhone不同的结果相比,模拟器
我试过子类和重写的cellForRowAtIndexPath:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [super tableView:tableView cellForRowAtIndexPath:indexPath];
cell.textLabel.backgroundColor = [UIColor redColor];
cell.detailTextLabel.backgroundColor = [UIColor redColor];
return cell;
}
我试图创建的UIColor类别:
+ (UIColor *)groupTableViewBackgroundColor {
return [UIColor redColor];
}
无论我尝试,模拟器显示正确的(预期)行为,但我的iPhone显示默认的组表背景。
我如何能解决这个问题有什么想法?也许这是我在我的应用程序委托中创建InAppSettingsViewController实例的方式......?
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
IASKAppSettingsViewController *iaskvc = [[IASKAppSettingsViewController alloc] init];
i = [UIImage imageNamed:@"20-gear-2.png"];
[[iaskvc tabBarItem] setImage:i];
[[iaskvc tabBarItem] setTitle:@"Settings"];
// Create the Toolbar
UITabBarController *tabBarController = [[UITabBarController alloc] init];
NSArray *viewControllers = [NSArray arrayWithObjects:iaskvc, nil];
[tabBarController setViewControllers:viewControllers];
[[self window] setRootViewController:tabBarController];
[self.window makeKeyAndVisible];
return YES;
}
的XCode:版本4.5.2(4G2008a) iOS的部署目标:5.1 iOS版的iPhone:6.0.1(10A523)
你试过从你的iPhone,并重新部署删除应用程序? –
是的,好几次!我添加了新功能(例如编辑标题,更改图标),以确保我重新安装。 –