Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHIPageControl/Core/CHIBasePageControl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,20 @@ import UIKit
func update(for progress: Double) {
fatalError("Should be implemented in child class")
}

open override func layoutSubviews() {
super.layoutSubviews()

// forcing rtl
if semanticContentAttribute == .forceRightToLeft ||
// not forcing and user interface RTL in system language.
(UIApplication.shared.userInterfaceLayoutDirection == .rightToLeft && semanticContentAttribute == .unspecified) {
transform = CGAffineTransform(scaleX: -1, y: 1)
} else {
transform = .identity
}
}


deinit {
self.displayLink?.remove(from: .current, forMode: .common)
Expand Down