Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing color of only one cell inside a row. #17

Open
hamzabinamin opened this issue Jul 29, 2018 · 8 comments
Open

Changing color of only one cell inside a row. #17

hamzabinamin opened this issue Jul 29, 2018 · 8 comments
Assignees

Comments

@hamzabinamin
Copy link

I have two questions:

  1. 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

  1. 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?
}
@hamzabinamin
Copy link
Author

@pavankataria Would you be able to add this in the coming days? How long would it take?

@pavankataria
Copy link
Owner

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.

@hamzabinamin
Copy link
Author

@pavankataria I was unsuccessful in coming up with a solution lol. Did you get a chance to look into this?

@pavankataria
Copy link
Owner

Okay @hamzabinamin, i'll take a look at this on the weekend!

@hamzabinamin
Copy link
Author

@pavankataria did you get a chance to figure this out?

@pavankataria
Copy link
Owner

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.

@pavankataria
Copy link
Owner

@hamzabinamin have you worked this out? I'd love a pull request, otherwise I'll have to implement this with a delegate method

@hamzabinamin
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants