Files
yuyin_ios/SweetParty/第三方库/BRPickerView/Base/BRPickerStyle.h
2025-08-08 11:05:33 +08:00

210 lines
7.1 KiB
Objective-C
Executable File
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.

//
// BRPickerStyle.h
// BRPickerViewDemo
//
// Created by 任波 on 2019/10/2.
// Copyright © 2019年 91renb. All rights reserved.
//
// 最新代码下载地址https://github.com/91renb/BRPickerView
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "BRPickerViewMacro.h"
// 边框样式(左边取消按钮/右边确定按钮)
typedef NS_ENUM(NSUInteger, BRBorderStyle) {
/** 无边框(默认) */
BRBorderStyleNone = 0,
/** 有圆角和边框 */
BRBorderStyleSolid,
/** 仅有圆角 */
BRBorderStyleFill
};
@interface BRPickerStyle : NSObject
/////////////////////////////// 选中行颜色,不是框架的,是自己定义的 ///////////////////////////////
/** 设置选中行颜色selectedColor*/
@property (nonatomic, strong) UIColor *selectedColor;
/////////////////////////////// 蒙层视图maskView///////////////////////////////
/** 设置背景颜色backgroundColor*/
@property (nonatomic, strong) UIColor *maskColor;
/** 隐藏 maskView默认为 NO */
@property (nonatomic, assign) BOOL hiddenMaskView;
////////////////////////////// 弹框视图alertView///////////////////////////////
/** 设置 alertView 弹框视图的背景颜色backgroundColor*/
@property (nonatomic, strong) UIColor *alertViewColor;
/** 设置 alertView 弹框视图左上和右上的圆角半径 */
@property (nonatomic, assign) NSInteger topCornerRadius;
/** 设置 alertView 弹框视图顶部边框线颜色 */
@property (nonatomic, strong) UIColor *shadowLineColor;
/** 隐藏 alertView 弹框视图顶部边框线,默认为 NO */
@property (nonatomic, assign) BOOL hiddenShadowLine;
//////////////////////////// 标题栏视图titleBarView ////////////////////////////
/** 设置 titleBarView 标题栏的背景颜色backgroundColor*/
@property (nonatomic, strong) UIColor *titleBarColor;
/** 设置 titleBarView 标题栏的高度height*/
@property (nonatomic, assign) CGFloat titleBarHeight;
/** 设置 titleBarView 标题栏底部分割线颜色 */
@property (nonatomic, strong) UIColor *titleLineColor;
/** 隐藏 titleBarView 标题栏底部分割线,默认为 NO */
@property (nonatomic, assign) BOOL hiddenTitleLine;
/** 隐藏 titleBarView默认为 NO */
@property (nonatomic, assign) BOOL hiddenTitleBarView;
////////////////////////// 标题栏中间labeltitleLabel///////////////////////////
/** 设置 titleLabel 的背景颜色backgroundColor*/
@property (nonatomic, strong) UIColor *titleLabelColor;
/** 设置 titleLabel 文本颜色textColor*/
@property (nonatomic, strong) UIColor *titleTextColor;
/** 设置 titleLabel 字体大小font*/
@property (nonatomic, strong) UIFont *titleTextFont;
/** 设置 titleLabel 的 frame */
@property (nonatomic, assign) CGRect titleLabelFrame;
/** 隐藏 titleLabel默认为 NO */
@property (nonatomic, assign) BOOL hiddenTitleLabel;
/////////////////////////////// 取消按钮cancelBtn//////////////////////////////
/** 设置 cancelBtn 的背景颜色backgroundColor*/
@property (nonatomic, strong) UIColor *cancelColor;
/** 设置 cancelBtn 标题的颜色titleColor*/
@property (nonatomic, strong) UIColor *cancelTextColor;
/** 设置 cancelBtn 标题的字体font*/
@property (nonatomic, strong) UIFont *cancelTextFont;
/** 设置 cancelBtn 的边框样式borderStyle*/
@property (nonatomic, assign) BRBorderStyle cancelBorderStyle;
/** 设置 cancelBtn 的 frame */
@property (nonatomic, assign) CGRect cancelBtnFrame;
/** 设置 cancelBtn 的 image */
@property (nonatomic, strong) UIImage *cancelBtnImage;
/** 设置 cancelBtn 的 title */
@property (nonatomic, copy) NSString *cancelBtnTitle;
/** 隐藏 cancelBtn默认为 NO */
@property (nonatomic, assign) BOOL hiddenCancelBtn;
/////////////////////////////// 确定按钮doneBtn////////////////////////////////
/** 设置 doneBtn 的背景颜色backgroundColor*/
@property (nonatomic, strong) UIColor *doneColor;
/** 设置 doneBtn 标题的颜色titleColor*/
@property (nonatomic, strong) UIColor *doneTextColor;
/** 设置 doneBtn 标题的字体font*/
@property (nonatomic, strong) UIFont *doneTextFont;
/** 设置 doneBtn 的边框样式borderStyle*/
@property (nonatomic, assign) BRBorderStyle doneBorderStyle;
/** 设置 doneBtn 的 frame */
@property (nonatomic, assign) CGRect doneBtnFrame;
/** 设置 doneBtn 的 image */
@property (nonatomic, strong) UIImage *doneBtnImage;
/** 设置 doneBtn 的 title */
@property (nonatomic, copy) NSString *doneBtnTitle;
/** 隐藏 doneBtn默认为 NO */
@property (nonatomic, assign) BOOL hiddenDoneBtn;
/////////////////////////////// 选择器pickerView///////////////////////////////
/** 设置 picker 的背景颜色backgroundColor*/
@property (nonatomic, strong) UIColor *pickerColor;
/** 设置 picker 中间两条分割线的背景颜色separatorColor*/
@property (nonatomic, strong) UIColor *separatorColor;
/** 设置 picker 文本的颜色textColor*/
@property (nonatomic, strong) UIColor *pickerTextColor;
/** 设置 picker 文本的字体font*/
@property (nonatomic, strong) UIFont *pickerTextFont;
/** 设置 picker 的高度height系统默认高度为 216 */
@property (nonatomic, assign) CGFloat pickerHeight;
/** 设置 picker 的行高rowHeight*/
@property (nonatomic, assign) CGFloat rowHeight;
/**
* 设置语言不设置或为nil时将随系统的语言自动改变
* language: zh-Hans简体中文、zh-Hant繁体中文、en英语
*/
@property(nonatomic, copy) NSString *language;
/////// 日期选择器单位样式showUnitType == BRShowUnitTypeSingleRow 时,生效)////////
/** 设置日期选择器单位文本的颜色textColor*/
@property (nonatomic, strong) UIColor *dateUnitTextColor;
/** 设置日期选择器单位文本的字体font*/
@property (nonatomic, strong) UIFont *dateUnitTextFont;
/** 设置日期选择器单位 label 的水平方向偏移量offsetX*/
@property (nonatomic, assign) CGFloat dateUnitOffsetX;
/** 设置日期选择器单位 label 的竖直方向偏移量offsetY*/
@property (nonatomic, assign) CGFloat dateUnitOffsetY;
/** 设置日期选择器单位是否与 选择器的列 水平居中对齐 */
@property (nonatomic, assign) BOOL horizontalCenter;
//////////////////////////////// 常用的几种模板样式 ////////////////////////////////
/// 模板样式1 - 取消/确定按钮圆角样式
/// @param themeColor 主题颜色
+ (instancetype)pickerStyleWithThemeColor:(UIColor *)themeColor;
/// 模板样式2 - 顶部圆角样式 + 完成按钮
/// @param doneTextColor 完成按钮标题的颜色
+ (instancetype)pickerStyleWithDoneTextColor:(UIColor *)doneTextColor;
/// 模板样式3 - 顶部圆角样式 + 图标按钮
/// @param doneBtnImage 完成按钮的 image
+ (instancetype)pickerStyleWithDoneBtnImage:(UIImage *)doneBtnImage;
/// 模板样式4 - 日期选择器单位顶部显示showUnitType == BRShowUnitTypeSingleRow 时,可设置)
+ (instancetype)pickerStyleWithDateUnitOnTop;
@end