This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UIDevice+DeviceModel.swift | |
// Extensions | |
// | |
// Created on Friday, July 14, 2023 | |
// Created by Abdelrahman Abo Al Nasr | |
// | |
// Copyright © 2024 Abdelrahman Abo Al Nasr. All rights reserved. | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// View+SizeToFitWidth.swift | |
// View Modifier | |
// | |
// Created on Thursday, August 8, 2024 | |
// Created by Abdelrahman Abo Al Nasr | |
// | |
// Copyright © 2024 Abdelrahman Abo Al Nasr. All rights reserved. | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// View+SizeToFitHeight.swift | |
// View Modifiers | |
// | |
// Created on Thursday, August 8, 2024 | |
// Created by Abdelrahman Abo Al Nasr | |
// | |
// Copyright © 2024 Abdelrahman Abo Al Nasr. All rights reserved. | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// View+RoundedBackgroundViewModifier.swift | |
// View Modifier | |
// | |
// Created on Tuesday, August 27, 2024 | |
// Created by Abdelrahman Abo Al Nasr | |
// | |
// Copyright © 2024 Abdelrahman Abo Al Nasr. All rights reserved. | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// View+RoundedBorderViewModifier.swift | |
// ViewModifiers | |
// | |
// Created on Thursday, August 29, 2024 | |
// Created by Abdelrahman Abo Al Nasr | |
// | |
// Copyright © 2024 Abdelrahman Abo Al Nasr. All rights reserved. | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
public extension Color { | |
init(hexCode: String) { | |
let scanner = Scanner(string: hexCode) | |
var rgbValue: UInt64 = 0 | |
scanner.scanHexInt64(&rgbValue) | |
let r = (rgbValue & 0xff0000) >> 16 | |
let g = (rgbValue & 0xff00) >> 8 |