Comments (1)
目前我在不修改源码的情况下,如下可以实现需求,但是方法有点挫
// 向下遍历,找到 CRLineView 变色
- (void)loop2FindCRLineView:(UIView*)view markRed:(BOOL)markRed{
if([view isKindOfClass:CRLineView.class]) {
if (markRed) {
((CRLineView*)view).underlineColorNormal = 红色;
((CRLineView*)view).underlineColorSelected = 红色;
((CRLineView*)view).underlineColorFilled = 红色;
((CRLineView*)view).lineView.backgroundColor = 红色;
} else {
((CRLineView*)view).underlineColorNormal = 灰色;
((CRLineView*)view).underlineColorSelected = 黑色;
((CRLineView*)view).underlineColorFilled = 黑色;
((CRLineView*)view).lineView.backgroundColor = 黑色;
}
return;
}
for (UIView* sub in view.subviews) {
[self loop2FindCRLineView:sub markRed:markRed];
}
}
- (void)changeBoxInputLineRed {
[self loop2FindCRLineView:_boxInputView markRed:YES];
}
- (void)changeBoxInputLineBlack {
[self loop2FindCRLineView:_boxInputView markRed:NO];
}
from crboxinputview.
Related Issues (20)
- 第一次输入密文延迟无效 删除后延迟才有效果
- 怎么删除错误的评论
- 光标如何靠左显示呢
- 设置inputType为CRInputType_Normal输入英文有问题 HOT 3
- 页面上移
- 哪个大佬有swift使用的demo啊 HOT 1
- 自动填充只添加了最后一位
- 验证码输入完后, 如何改变边框和输入文字颜色? HOT 2
- 有内存泄漏的地方
- 当有占位符的时候,我想更改其中几个值,不全部更改,但是光标总是从第一个开始
- 请问UItest 的时候,怎么输入框获取元素
- DEMO里怎么没有CRLineView这个类了?现在不支持自定义选中的line样式了?
- 在Swift中使用时, 初始化 CRBoxInputCellProperty 无作用 HOT 1
- boxFlowLayout.minLineSpacing = 0; 的时候边框重叠
- 在与IQKeyboardmanager一起使用时,结束输入 页面会上移 HOT 2
- _Nullable 是否有必要
- 密文模式下第一次输入不回显密码
- 偶发键盘不能弹出 HOT 1
- 禁止可被粘贴复制?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crboxinputview.