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

Added parameter for right offset for the searchBar from main view #46

Open palla89 opened 4 years ago

palla89 commented 4 years ago

Hi, I needed to add two buttons near the UISearchBar and I couldn't do it without modifying the project's code.

I added an optional CGFloat to specify, similarly to the searchView's height, the empty space from the right of the containing view, as you can see here:

func rightOffsetForSearchView(in dataTable: SwiftDataTable) -> CGFloat {
        return 300
    }

searchbar-offset

pavankataria commented 4 years ago

This is awesome. This is a great opportunity to add a left and right view and you can add whatever you want inside it.