InAppSettingKitビューコントローラの背景色を変更しようとしています。
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展開ターゲット:iPhone上の5.1 iOS:6.0.1(10A523)