Xcode 5.0, iOS 7 and updating an existing app. UITableView
selected row is now gray, not blue.
From what I\'ve read they changed the default selection
I know this has already been answered but the last thing I wanted to do was touch all of my cellForRowAtIndexPath
methods. So, I used an appearance proxy in my App Delegate. I took @null's code above to set the selected background view and in the applicationDidFinishLaunching:withOptions:
method I placed this code.
UIView *bgColorView = [[UIView alloc] init];
//the rest of null's code to make the view
[[UITableViewCell appearance] setSelectedBackgroundView:bgColorView];
Then to make the white text hi light:
[[UILabel appearanceWhenContainedIn:[UITableViewCell class], nil] setHighlightedTextColor:[UIColor whiteColor]];
This made a global change in my app. The appearance proxy was introduced in iOS5 and Mattt has a great article on how to use it at his NSHipster blog.