添加登录流程、会话路由和对齐参考 UI 的主 Tab 框架
This commit is contained in:
19
suixinkan/Theme/AppColor.swift
Normal file
19
suixinkan/Theme/AppColor.swift
Normal file
@ -0,0 +1,19 @@
|
||||
//
|
||||
// AppColor.swift
|
||||
// suixinkan
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
/// 应用主题色,与 Android `theme/Color.kt` 对齐。
|
||||
enum AppColor {
|
||||
|
||||
static let primary = UIColor(red: 0 / 255, green: 115 / 255, blue: 255 / 255, alpha: 1)
|
||||
static let text333 = UIColor(red: 51 / 255, green: 51 / 255, blue: 51 / 255, alpha: 1)
|
||||
static let text666 = UIColor(red: 102 / 255, green: 102 / 255, blue: 102 / 255, alpha: 1)
|
||||
static let agreementLink = UIColor(red: 32 / 255, green: 139 / 255, blue: 255 / 255, alpha: 1)
|
||||
static let inputBackground = UIColor(red: 244 / 255, green: 244 / 255, blue: 244 / 255, alpha: 1)
|
||||
static let secondaryButtonBackground = UIColor(red: 239 / 255, green: 246 / 255, blue: 255 / 255, alpha: 1)
|
||||
static let buttonDisabled = UIColor(red: 192 / 255, green: 192 / 255, blue: 192 / 255, alpha: 1)
|
||||
static let placeholder = UIColor.gray
|
||||
}
|
||||
19
suixinkan/Theme/UIColor+Hex.swift
Normal file
19
suixinkan/Theme/UIColor+Hex.swift
Normal file
@ -0,0 +1,19 @@
|
||||
//
|
||||
// UIColor+Hex.swift
|
||||
// suixinkan
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
extension UIColor {
|
||||
|
||||
/// 通过 0xRRGGBB 和透明度创建 UIColor。
|
||||
convenience init(hex: UInt, alpha: CGFloat = 1.0) {
|
||||
self.init(
|
||||
red: CGFloat((hex >> 16) & 0xff) / 255.0,
|
||||
green: CGFloat((hex >> 8) & 0xff) / 255.0,
|
||||
blue: CGFloat(hex & 0xff) / 255.0,
|
||||
alpha: alpha
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user