Skip to content

Commit

Permalink
avoid switching when textalignment is centered
Browse files Browse the repository at this point in the history
  • Loading branch information
dark2torch committed Jan 18, 2019
1 parent 973ecc2 commit 213e0ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MOLH/MOLH.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ protocol TextAlignmented: NSObjectProtocol {

extension LayoutSwizzlable where Self: TextAlignmented & Taggable {
func handleSwitching() {
if self.tag < MOLH.shared.maximumLocalizableTag + 1 {
if self.tag < MOLH.shared.maximumLocalizableTag + 1, textAlignment != .center {
if MOLHLanguage.isRTLLanguage() {
if self.textAlignment == .right { return }
self.textAlignment = .right
Expand Down

0 comments on commit 213e0ad

Please sign in to comment.