Files
yingmeng-ios-switf/yinmeng-ios/Modules/Chat/Model/ChatUIConfig.swift
2024-02-27 23:34:55 +08:00

63 lines
1.7 KiB
Swift

//
// ChatUIConfig.swift
// yinmeng-ios
//
// Created by MaiMang on 2024/2/27.
//
import Foundation
public class ChatUIConfig {
/// UI
public static let ui = UI()
///
public static let layout = Layout()
public class UI {
public enum AvatarType {
case cycle //
case rectangle(CGFloat) //
}
///
public var avatarType: AvatarType = .cycle
///
public var avatarPlaceholderImage = UIImage()
/// /
public var tipsColor = UIColor.lightGray
/// /
public var tipsFont = UIFont.systemFont(ofSize: 12)
/// ()
public var messageFont = UIFont.systemFont(ofSize: 14)
///
public var messageNameFont = UIFont.systemFont(ofSize: 13)
///
public var messageNameColor = UIColor(red: 5/255.0, green: 19/255.0, blue: 47/255.0, alpha: 1)
/// ()
public var leftMessageColor = UIColor.black
/// ()
public var rightMessageColor = UIColor.black
}
public class Layout {
///
public var avatarSize: CGFloat = 34.0
/// cell
public var cellContentInsets = UIEdgeInsets(top: 8, left: 16, bottom: 8, right: 16)
///
public var textInsets = UIEdgeInsets(top: 10, left: 15, bottom: 10, right: 15)
///
public var contentMaxWidth: CGFloat = (UIScreen.main.bounds.size.width - 170)
///
public var pictureMaxSize = CGSize(width: 150, height: 150)
///
public var bubbleMinHeight: CGFloat = 40.0
///
public var margin: CGFloat = 8.0
}
}