Skip to content

0.8.1

Compare
Choose a tag to compare
@pavankataria pavankataria released this 29 Aug 02:04
· 20 commits to master since this release

Summary:

  • You will now automatically truly support right-to-left (RTL) language users.

Technical:

  • Previously only the text within the data table would be flipped RTL for RTL languages but the content within the scrollview - such as columns - would remain in left-to-right. This release introduces the fix and ensures the layout direction is also along with the text giving a true RTL experience to RTL language users.

In practise

How do I opt in and ensure my users can benefit from this feature?

The package automatically enables this feature for you.

How can I manage this feature myself?

You can choose to opt out or opt in for certain data tables in two ways:

Via Delegate method

Simply adopt the SwiftDataTable's delegate method with the following signature:

    func shouldSupportRightToLeftInterfaceDirection() -> Bool {
        // and return true or false here. True will allow the data table to detect if a RTL language is being used and will flip the entire layout appropriately and display content correctly.
        // false will leave the layout direction and only flip the text which would happen regardless anyway without this feature.
        return true 
    }

Via Configuration

var configuration = DataTableConfiguration()
// The default is true
configuration.shouldSupportRightToLeftInterfaceDirection: Bool = false // set to false incase you don't want to use this feature