Skip to content

Support RTL Directions #155

Description

@AbuMandour

iI want to create a simple flow layout that supports RTL, I tried this code but items order always change

       let viewSource = ClosureViewSource(viewUpdater: { (view: UILabel, data: String, index: Int) in
            view.text = data
            view.font = UIFont(name: "GraphikArabic-Bold",size: 12)
            view.textColor = DesignSystem.Colors.selectedRedColor.color
        })
        let sizeSource = { (index: Int, data: String, collectionSize: CGSize) -> CGSize in
          return data.size(withAttributes: [
                                NSAttributedString.Key.font : UIFont.boldSystemFont(ofSize: 13)])
        }
        let provider = BasicProvider(
          dataSource: dataSource,
          viewSource: viewSource,
          sizeSource: sizeSource
        )        
        provider.layout = FlowLayout(lineSpacing: 5,
                                     interitemSpacing: 10,
                                     justifyContent: .end,
                                     alignItems: .end,
                                     alignContent: .end)
        keywordCollectionView.provider = provider 

any help?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions