Answered By: Tom The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0. ![]() textLabel.text gives you the label for that cell. If anyone can help me implement this, I'd really appreciate it. tableView cellForRowAtIndexPath:indexPath gives you the selected cell and then the. I don't see how I can introduce some sort of cell.hoveredBackgroundView for the third image. UIImageView *cellBackgroundSelectedView = initWithImage:cellBackgroundSelected] Ĭell.backgroundView = cellBackgroundView Ĭell.selectedBackgroundView = cellBackgroundSelectedView Ĭ = Īs you can see, I only have two states as of now. UIImage *cellBackgroundNormal = initWithImage:cellBackgroundNormal] NSString *cellIdentifier = *cell = Ĭell = initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellIdentifier] This is my code: (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath However, I'd like to add an additional third image, so that when the user selects a cell, it briefly changes to that third color before going blue (selected). ![]() ![]() The normal (unselected) state for each cell is an image, the selected state is also an image (that looks like the default blue one). Play with values to find the ones you want another option is fill the tableview's cells with labels and set the text color of the label. What I am stuck in is when user touches cell of tableview, then I want to show the background color of the cell other than the default blue color values for highlighting the selection of cell.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |