This adds support for right-to-left layouts, which is useful when supporting RTL languages like Hebrew and Arabic. The default value of this read-only UICollectionViewLayout property, flipsHorizontallyInOppositeLayoutDirection, is false. If there is enough demand for turning this behavior off, we can make it configurable via a public API addition.
Sample app
Airbnb app
Related Issue
N/A
Motivation and Context
The layout direction changes to be RTL when setting the device language to an RTL language. We must return true for this property to enable the collection view's coordinate system to get flipped horizontally.
How Has This Been Tested
Tested by changing the device language to Hebrew and confirming the layout direction matches the text direction.
Details
This adds support for right-to-left layouts, which is useful when supporting RTL languages like Hebrew and Arabic. The default value of this read-only
UICollectionViewLayout
property,flipsHorizontallyInOppositeLayoutDirection
, isfalse
. If there is enough demand for turning this behavior off, we can make it configurable via a public API addition.Related Issue
N/A
Motivation and Context
The layout direction changes to be RTL when setting the device language to an RTL language. We must return true for this property to enable the collection view's coordinate system to get flipped horizontally.
How Has This Been Tested
Tested by changing the device language to Hebrew and confirming the layout direction matches the text direction.
Types of changes
Checklist