Files
real-e-party-iOS/YuMi/CustomUI/TTPopup/Config/TTAlertConfig.h.backup
2025-10-17 14:52:29 +08:00

87 lines
2.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// TTAlertConfig.h
// YM_TTChatViewKit
//
// Created by lee on 2019/5/20.
// Copyright © 2023 YUMI. All rights reserved.
// alert 配置
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "TTAlertButtonConfig.h"
#import "TTAlertMessageAttributedConfig.h"
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, TTAlertActionStyle) {
TTAlertActionConfirmStyle = 0, // 只有确定按钮
TTAlertActionCancelStyle = 1, // 只有取消按钮
TTAlertActionBothStyle = 2, // 全部按钮
};
@interface TTAlertConfig : NSObject
// 按钮显示风格
@property (nonatomic, assign) TTAlertActionStyle actionStyle;
// 容器背景设置
@property (nonatomic, strong) UIColor *backgroundColor;
// 标题设置
@property (nonatomic, copy) NSString *title;
@property (nonatomic, strong) UIFont *titleFont;
@property (nonatomic, strong) UIColor *titleColor;
// 内容设置
@property (nonatomic, copy) NSString *message;
@property (nonatomic, strong) UIFont *messageFont;
@property (nonatomic, strong) UIColor *messageColor;
/** 内容的行间距,默认不设置,当值为 0 或负数时无效 */
@property (nonatomic, assign) CGFloat messageLineSpacing;
@property(nonatomic, assign) NSTextAlignment messageTextAlignment;
/** 内容富文本配置 */
@property (nonatomic, strong) NSArray<TTAlertMessageAttributedConfig *> *messageAttributedConfig;
///配置内容的富文本
@property (nonatomic,strong) NSMutableAttributedString *messageAttributed;
// 取消按钮配置
@property (nonatomic, strong) TTAlertButtonConfig *cancelButtonConfig;
// 确定按钮配置
@property (nonatomic, strong) TTAlertButtonConfig *confirmButtonConfig;
/**
背景蒙层的透明度
@Description 默认是 000000 黑色 0.3 alpha
*/
@property (nonatomic, assign) CGFloat maskBackgroundAlpha;
// 圆角
@property (nonatomic, assign) CGFloat cornerRadius;
// 点击蒙层是否消失默认YES
@property (nonatomic, assign) BOOL shouldDismissOnBackgroundTouch;
/**
点击确定取消按钮时禁止弹窗自动消失默认NO
@discussion 若值为 YES需要主动调用 [TTPopup dismiss] 消除弹窗
*/
@property (nonatomic, assign) BOOL disableAutoDismissWhenClickButton;
/**
重复弹窗过滤默认NO
@discussion 设置过滤时,队列中将不会出现相同过滤标识的弹窗
过滤标识通过 #<filterIdentifier> 设置
*/
@property (nonatomic, assign) BOOL shouldFilterPopup;
/**
过滤标识默认nil
*/
@property (nonatomic, copy) NSString *filterIdentifier;
@end
NS_ASSUME_NONNULL_END