I have seen many many applications so far, i mean really awesome applications. Still one thing i see which is almost common with all of them except few one is that Custom UITableViewCells does not change text color when selected/highlighted. I am also a developer and i know these kind of things miss out while developing applications in rapid development cycles and under timeline pressure :(. but then it really shows high level of ignorance from developers side.
The solution is simple. Generally what we do is we create custom UIView and add it inside UITableViewCell. Just we need to do some extra coding in UIView. as shown in TableViewSuite.
CustomCellView.h
#import <UIKit/UIKit.h> @interface CustomCellView : UIView { BOOL highlighted; } @property (nonatomic, getter=isHighlighted) BOOL highlighted; @end
CustomCellView.m
#import "CustomCellView.h" @implementation CustomCellView @synthesize highlighted; - (id)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { // Initialization code } return self; } - (void)setHighlighted:(BOOL)isHighlighted { // If highlighted state changes, need to redisplay. if (highlighted != isHighlighted) { highlighted = isHighlighted; [self setNeedsDisplay]; } } - (void)drawRect:(CGRect)rect { UIColor *nameTextColor; if( self.highlighted ) { nameTextColor = [UIColor whiteColor]; } else { nameTextColor = [UIColor blackColor]; } // Draw code } - (void)dealloc { [super dealloc]; } @end