SwiftDataTables
SwiftDataTables copied to clipboard
Changing color of only one cell inside a row.
I have two questions:
- You have the two functions for highlighted and unhighlighted row. But I want to show different color for only one cell of a row, not the entire row. Is that somehow possible?
func dataTable(_ dataTable: SwiftDataTable, highlightedColorForRowIndex at: Int) -> UIColor func dataTable(_ dataTable: SwiftDataTable, unhighlightedColorForRowIndex at: Int) -> UIColor
- Also if I wanted to use these functions for the entire row, how would I use them in a scenario such as the following:
if value < 0 at row 4 {
// change color of row 3 to red
// how do I call the delegate method here to choose the row?
}
@pavankataria Would you be able to add this in the coming days? How long would it take?
Hey there, I sure can. I've just been thinking about the implementation of the API and how users would best want to interface with a feature like this. Have you tried implementing this yourself? Might be worth a shot. Suggestions are welcomed.
@pavankataria I was unsuccessful in coming up with a solution lol. Did you get a chance to look into this?
Okay @hamzabinamin, i'll take a look at this on the weekend!
@pavankataria did you get a chance to figure this out?
Hey it's been extremely busy for me! A pull request is welcome! Look at how I highlight the entire column, create another method but do it for a single cell.
@hamzabinamin have you worked this out? I'd love a pull request, otherwise I'll have to implement this with a delegate method
@pavankataria Hey, we've put a hold on this feature for now. Unfortunately there wasn't much time to implement that. If you can include that in the delegate methods then that would be great man.