ios - UITableView - SelectedBackgroundView not working in iOS7 with Auto-Layout -
I am using UITableVeiw with static cells in IOS7. Before using the autollections of my storyboard, the table view would look like this
< / P> I do not have any automatic layout problem that has been presented to me just now that I am not looking at foreground and background with auto-layout. Any help? After the text "itemprop =" text "> The auto-layout seems like the problem was causing me. I added a background view and selected background view programmatically and it works.
- (zero) tableView: (UITableView *) tableView willDisplayCell: (UITableViewCell *) cell forRowAtIndexPath: (NSIndexPath *) indexPath {UIView * selectedView = [UIView new]; SelectedView.backgroundColor = [UIColor colorWithRed: 0.604 green: 0.812 blue color: 0.059 alpha: 1.000]; Cell.selectedBackgroundView = selectedView; UIView * defaultView = [UIView new]; defaultView.backgroundColor = [UIColor colorWithRed: 0.396 green: 0.404 blue color: 0.404 alpha: 1.000]; Cell.backgroundView = defaultView; }
Comments
Post a Comment