-
Notifications
You must be signed in to change notification settings - Fork 261
Open
Description
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
Labels
No labels