diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 92ab362a..ca29b6cf 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,6 +1,14 @@ # Release Notes +## 3.1.3 + +This version fixes a bug that caused regular items to not apply right to left text alignment if the device locale requested it. + +* `ActionSheetItemCell` now uses `.natural` instead of `.left` by default. +* The standard appearance doesn't apply `.left` to the base cell or section titles. + + ## 3.1.2 This version updates all external test dependencies. diff --git a/Sources/Sheeeeeeeeet/ActionSheet/Appearance/ActionSheetAppearance.swift b/Sources/Sheeeeeeeeet/ActionSheet/Appearance/ActionSheetAppearance.swift index f28e9e38..3b7d2d60 100644 --- a/Sources/Sheeeeeeeeet/ActionSheet/Appearance/ActionSheetAppearance.swift +++ b/Sources/Sheeeeeeeeet/ActionSheet/Appearance/ActionSheetAppearance.swift @@ -153,10 +153,8 @@ open class ActionSheetAppearance { Apply action sheet text alignments. */ open func applyTextAlignments() { - item.itemTextAlignment = .left button.itemTextAlignment = .center title.itemTextAlignment = .center - sectionTitle.itemTextAlignment = .left } } diff --git a/Sources/Sheeeeeeeeet/ActionSheet/Cells/ActionSheetItemCell.swift b/Sources/Sheeeeeeeeet/ActionSheet/Cells/ActionSheetItemCell.swift index badf94f4..fd4a4bee 100644 --- a/Sources/Sheeeeeeeeet/ActionSheet/Cells/ActionSheetItemCell.swift +++ b/Sources/Sheeeeeeeeet/ActionSheet/Cells/ActionSheetItemCell.swift @@ -57,7 +57,7 @@ open class ActionSheetItemCell: UITableViewCell { // MARK: - Appearance Properties @objc public dynamic var height: Double = 0 - @objc public dynamic var itemTextAlignment: NSTextAlignment = .left + @objc public dynamic var itemTextAlignment: NSTextAlignment = .natural @objc public dynamic var titleColor: UIColor? @objc public dynamic var titleFont: UIFont? diff --git a/Tests/SheeeeeeeeetTests/ActionSheet/Cells/ActionSheetItemCellTests.swift b/Tests/SheeeeeeeeetTests/ActionSheet/Cells/ActionSheetItemCellTests.swift index 86b88350..32ea212d 100644 --- a/Tests/SheeeeeeeeetTests/ActionSheet/Cells/ActionSheetItemCellTests.swift +++ b/Tests/SheeeeeeeeetTests/ActionSheet/Cells/ActionSheetItemCellTests.swift @@ -27,7 +27,6 @@ class ActionSheetItemCellTests: QuickSpec { } } - describe("refreshing") { it("aborts if cell has no item reference") { @@ -59,7 +58,7 @@ class ActionSheetItemCellTests: QuickSpec { expect(cell.textLabel?.font).to(be(cell.titleFont)) expect(cell.textLabel?.text).to(equal("foo")) expect(cell.textLabel?.textColor).to(equal(.yellow)) - expect(cell.textLabel?.textAlignment).to(equal(.left)) + expect(cell.textLabel?.textAlignment).to(equal(.natural)) expect(cell.detailTextLabel?.font).toNot(beNil()) expect(cell.detailTextLabel?.font).to(be(cell.subtitleFont)) expect(cell.detailTextLabel?.text).to(equal("bar"))