Note that there are some explanatory texts on larger screens.

plurals
  1. POCustomising iOS InAppSettingsKit gives different results on iPhone compared to simulator
    primarykey
    data
    text
    <p>I'm trying to change the background color of the InAppSettingKit view controller.</p> <p>I've tried subclassing and overriding the cellForRowAtIndexPath:</p> <pre><code>- (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; } </code></pre> <p>I've tried creating a category for UIColor:</p> <pre><code>+ (UIColor *)groupTableViewBackgroundColor { return [UIColor redColor]; } </code></pre> <p>Whatever I try, the simulator shows the correct (expected) behaviour, but my iPhone shows the default group table background.</p> <p>Any thoughts on how I can fix this? Perhaps it's the way I'm creating an instance of my InAppSettingsViewController in my app delegate ...?</p> <pre><code>- (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; } </code></pre> <p>XCode: Version 4.5.2 (4G2008a) iOS deployment target: 5.1 iOS on iPhone: 6.0.1 (10A523)</p> <p><img src="https://i.stack.imgur.com/9v6me.png" alt="Simulator -- expected"> <img src="https://i.stack.imgur.com/xZydY.png" alt="iPhone -- customisation not working"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload