         let itemWitdh = segmentioItems.enumerated().map { (index, _) -> CGFloat in
             return segmentWidth(for: IndexPath(item: index, section: 0))
         }
+        
+        var isRTL = false
+        if #available(iOS 9.0, *) {
+            isRTL = UIView.userInterfaceLayoutDirection(for: semanticContentAttribute) == .rightToLeft
+        } else {
+            // Use the previous technique
+            isRTL = UIApplication.shared.userInterfaceLayoutDirection == .rightToLeft
+        }
+        
         if let indicatorLayer = indicatorLayer, let options = segmentioOptions.indicatorOptions {
             let item = itemInSuperview(ratio: options.ratio)
 

        var cellRect = CGRect.zero
        var shapeLayerWidth: CGFloat = 0
        
        if let collectionView = segmentioCollectionView, selectedSegmentioIndex != -1 {
            collectionViewWidth = collectionView.frame.width
            cellWidth = segmentWidth(for: IndexPath(row: selectedSegmentioIndex, section: 0))
            var x: CGFloat = 0
            
            switch segmentioOptions.segmentPosition {
            case .fixed:
                x = floor(CGFloat(selectedSegmentioIndex) * cellWidth - collectionView.contentOffset.x)
                
            case .dynamic:
                for i in 0..<selectedSegmentioIndex {
                    x += segmentWidth(for: IndexPath(item: i, section: 0))
                }
                
                x -= collectionView.contentOffset.x
            }
            
            cellRect = CGRect(
                x: x,
                y: 0,
                width: cellWidth,
                height: collectionView.frame.height


extension Segmentio.Points {
    
    init(item: Segmentio.ItemInSuperview, atIndex index: Int, allItemsCellWidth: [CGFloat], pointY: CGFloat, position: SegmentioPosition, style: SegmentioStyle, isRTL: Bool) {
        let cellWidth = item.cellFrameInSuperview.width
        var startX = item.startX
        var endX = item.endX
