Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

自定义两侧按钮颜色 #337

Open
laizhiVP opened this issue Mar 18, 2025 · 1 comment
Open

自定义两侧按钮颜色 #337

laizhiVP opened this issue Mar 18, 2025 · 1 comment

Comments

@laizhiVP
Copy link

你好,picker两侧的按钮,确定和取消,可以把按钮暴露到.h文件么,希望可以自己更改按钮的颜色。

@agiapp
Copy link
Owner

agiapp commented Mar 18, 2025

常见的样式可以 BRPickerStyle 来自定义样式;特殊场景可以自定义弹框视图来实现:

/// 扩展一:添加选择器到指定容器视图上
/// 应用场景:可将中间的滚轮选择器 pickerView 视图(不包含蒙层及标题栏)添加到任何自定义视图上(会自动填满容器视图),也方便自定义更多的弹框样式
/// 补充说明:如果是自定义确定按钮,需要回调默认选择的值:只需在自定义确定按钮的点击事件方法里执行一下 doneBlock 回调(目的是去触发组件内部执行 resultBlock 回调,进而回调默认选择的值)
/// @param view 容器视图
- (void)addPickerToView:(nullable UIView *)view;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants