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

Configuration options doesn't change #34

Closed Waskalle-Bahena closed 5 years ago

Waskalle-Bahena commented 5 years ago

Environment: SwiftDataTables: 0.7.3 Xcode: 10.0 iOS: 21.1

Hello, I recently installed swiftdatatables in my project, and I have a detail to change the configuration options since I am trying to change the color of the rows or hide the search bar and it does not take any change.

I checked how the example is done and basically I am doing the same, but with me it does not respect any change in the configuration. i Hope you can help me.

This is how i'm triying to do it:


        configuration.shouldShowSearchSection = false

        configuration.highlightedAlternatingRowColors = [
            .init(1, 0.7, 0.7),
            .init(1, 0.7, 0.5),
            .init(1, 1, 0.5),
            .init(0.5, 1, 0.5),
            .init(0.5, 0.7, 1),
            .init(0.5, 0.5, 1),
            .init(1, 0.5, 0.5)
        ]
        configuration.unhighlightedAlternatingRowColors = [
            .init(1, 0.90, 0.90),
            .init(1, 0.90, 0.7),
            .init(1, 1, 0.7),
            .init(0.7, 1, 0.7),
            .init(0.7, 0.9, 1),
            .init(0.7, 0.7, 1),
            .init(1, 0.7, 0.7)
        ]

        var dataTable : SwiftDataTable! = nil

        dataTable = SwiftDataTable(
            data: self.getData(),
            headerTitles: self.getHeaders(),
            options: configuration,
            frame: self.view.frame
        )
        dataTable.delegate = self

        dataTable.backgroundColor = UIColor(red: 235/255, green: 235/255, blue: 235/255, alpha: 1)
        dataTable.autoresizingMask = [.flexibleWidth, .flexibleHeight]
        dataTable.frame = self.view.frame
        self.view.addSubview(dataTable)```
altagir commented 5 years ago

did you solve it because I see nothing wrong here post your code

Waskalle-Bahena commented 5 years ago

i didn't solved yet :(, i installed the package via cocoa pods on my proyect, so that code it's what i'm using to use my dataTables.

I have no errors :/.

pavankataria commented 5 years ago

Are you able to reproduce this in a brand new bare bones project? I'd be happy to take a look if you're able to reproduce this.

Waskalle-Bahena commented 5 years ago

Thanks for your time.

Ok i do that on a new project, where only install the swiftDataTables plugin and setUp an example.

It's also not working, i have the same proble with the configuration attributes. If i'm doing something wrong let know it.

Swift 5 Deployment Target 12.2 Xcode 10 SwiftDataTables: 0.7.3

PROJECT TestDataTable.zip

pavankataria commented 5 years ago

Thank you for the project, that helps. I've seen what the problem is.

Here's the next steps I'l be carrying out. 1) Investigate the issue [Done] 2) Reaffirm issue with tests and resolve the issue [In the process]. 3) upload a new version of the project.

I'll keep you updated

pavankataria commented 5 years ago

Quick update: I've fixed the issue after writing the tests to confirm the issue. All the tests pass now so this issue will no longer happen. This fix will be released in the next version: 0.7.4

Waskalle-Bahena commented 5 years ago

Thank you so much for your time @pavankataria , i'll be waiting for the next version. ✌️

pavankataria commented 5 years ago

🎉 🎉 @Waskalle-Bahena cc @altagir This fix is available as of version 0.7.4 🎉 🎉 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!

Let me know what you think and if all works well so we can close this issue if there are no problems on your side! 🎉

It should be as simple as updating your library.

Waskalle-Bahena commented 5 years ago

Perfect.

I've run the pod update on my project and all works perfectly.

Again thank you so much for your help.

Let's share this amazing package!!! 🤘