pavankataria / SwiftDataTables

A Swift Data Table package, display grid-like data sets in a nicely formatted table for iOS. Subclassing UICollectionView that allows ordering, and searching with extensible options.
MIT License
448 stars 69 forks source link

Specify color of sort arrow icon #31

Closed altagir closed 5 years ago

altagir commented 5 years ago

hello

Can we add a property for the color of the arrow icon when sorted ?

it would require in DataHeaderFooterViewModel:

var imageForSortingElement: UIImage? {
   ...
   let image = UIImage(contentsOfFile: imagePath)?.withRenderingMode(.alwaysTemplate)
   ...
}

and in DataHeaderFooter :

func setup(viewModel: DataHeaderFooterViewModel) {
    ...
    self.sortingImageView.tintColor = (viewModel.sortType != .unspecified) ? UIColor.red : UIColor.gray
   ...
}

replace UIColor.red by new name of property

regards

pavankataria commented 5 years ago

This should be easy to do. Have you already done this? I welcome pull requests if you're up for creating one.

altagir commented 5 years ago

I just did a pull request to your master, cheers

altagir commented 5 years ago

news?

pavankataria commented 5 years ago

Hey there, awesome. Will review this tonight. I've been travelling here and there and haven't been able to tune in.

pavankataria commented 5 years ago

🎉 🎉 @altagir This improvement of yours is now available as of version 0.7.4 🎉 🎉 Sorry it took a while, was extremely caught up with some issues at work.

TIL: There were a few issues related to updating to swift 5, the technicals are the .swift_version file is now redundant, and swift_version has to be used in the podspec file.

https://github.com/pavankataria/SwiftDataTables/releases/tag/0.7.4

🚀 SwiftDataTables (0.7.4) successfully published 📅 June 18th, 18:32 👍 Share with your friends and colleagues!