diff --git a/Modules/Sources/WordPressUI/Extensions/UIImage+Color.swift b/Modules/Sources/WordPressUI/Extensions/UIImage+Color.swift index 4437aacdbe07..73f507749adb 100644 --- a/Modules/Sources/WordPressUI/Extensions/UIImage+Color.swift +++ b/Modules/Sources/WordPressUI/Extensions/UIImage+Color.swift @@ -4,13 +4,17 @@ public extension UIImage { /// Create an image of the given `size` that's made of a single `color`. /// - /// Size is in points. + /// - parameter size: Size in points. convenience init(color: UIColor, size: CGSize = CGSize(width: 1.0, height: 1.0)) { - let image = UIGraphicsImageRenderer(size: size).image { rendererContext in + let image = UIGraphicsImageRenderer(size: size).image { context in color.setFill() - rendererContext.fill(CGRect(origin: .zero, size: size)) + context.fill(CGRect(origin: .zero, size: size)) + } + if let cgImage = image.cgImage { + self.init(cgImage: cgImage, scale: image.scale, orientation: .up) + } else { + assertionFailure("faield to render image with color") + self.init() } - - self.init(cgImage: image.cgImage!) // Force because there's no reason that the `cgImage` should be nil } } diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 9789b2bf087a..6475505c9181 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -8,6 +8,7 @@ * [*] Fix dynamic type support in the compliance popover [#23932] * [*] Improve transisions and interactive dismiss gestures for sheets [#23933] * [*] Add "Share" action to site link context menu on dashboard [#23935] +* [*] Fix layout issues in Privacy Settings section of App Settings [#23936] 25.6 ----- diff --git a/WordPress/Classes/ViewRelated/Me/App Settings/Privacy Settings/PrivacySettingsViewController.swift b/WordPress/Classes/ViewRelated/Me/App Settings/Privacy Settings/PrivacySettingsViewController.swift index 7f295f430f68..50be801ad3d7 100644 --- a/WordPress/Classes/ViewRelated/Me/App Settings/Privacy Settings/PrivacySettingsViewController.swift +++ b/WordPress/Classes/ViewRelated/Me/App Settings/Privacy Settings/PrivacySettingsViewController.swift @@ -38,7 +38,7 @@ class PrivacySettingsViewController: UITableViewController { PaddedInfoRow.self, SwitchRow.self, PaddedLinkRow.self - ], tableView: self.tableView) + ], tableView: self.tableView) handler = ImmuTableViewHandler(takeOver: self) reloadViewModel()