From 132739ee2b6d7a61e39c6a3dfb111c05af99f3a3 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Lapersonne Date: Fri, 26 Jan 2024 17:54:16 +0100 Subject: [PATCH] refactor: #647 - replace deprecated API for colors computation Signed-off-by: Pierre-Yves Lapersonne --- CHANGELOG.md | 1 + .../OrangeDesignSystem/Utils/Color/UIColor+extension.swift | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5209fc44..c38b10e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased](https://github.com/Orange-OpenSource/ods-ios/compare/0.16.0...qualif) +- [DemoApp/SDK] Code cleanup ([#647](https://github.com/Orange-OpenSource/ods-ios/issues/647)]) - [SDK] Update Banners to align buttons when text is too long ([#642](https://github.com/Orange-OpenSource/ods-ios/issues/642)) - [SDK] Update Cards to align buttons when text is too long ([#630](https://github.com/Orange-OpenSource/ods-ios/issues/630)) - [Tooling] Upgrate to xcode 15 ([#638](https://github.com/Orange-OpenSource/ods-ios/issues/638)) diff --git a/OrangeDesignSystem/Sources/OrangeDesignSystem/Utils/Color/UIColor+extension.swift b/OrangeDesignSystem/Sources/OrangeDesignSystem/Utils/Color/UIColor+extension.swift index 75ef528a..fdf2ce11 100644 --- a/OrangeDesignSystem/Sources/OrangeDesignSystem/Utils/Color/UIColor+extension.swift +++ b/OrangeDesignSystem/Sources/OrangeDesignSystem/Utils/Color/UIColor+extension.swift @@ -25,8 +25,8 @@ extension UIColor { return nil } - var rgbValue: UInt32 = 0 - Scanner(string: cString).scanHexInt32(&rgbValue) + var rgbValue: UInt64 = 0 + Scanner(string: cString).scanHexInt64(&rgbValue) let a = CGFloat((rgbValue & 0xFF00_0000) >> 24) / 255.0 let r = CGFloat((rgbValue & 0x00FF_0000) >> 16) / 255.0