Comments (8)
如果是使用的UItextField,因为用的非系统键盘 ,所以不会走UItextfield的代理。可以通过kvo来监听它的text值。
from vehicle-keyboard-ios.
如果是使用的UItextField,因为用的非系统键盘 ,所以不会走UItextfield的代理。可以通过kvo来监听它的text值。
尝试过 没有调起kvo的方法
from vehicle-keyboard-ios.
@yzhtracy text可以kvo,但是 textFieldShouldReturn:
也没见调用啊
from vehicle-keyboard-ios.
文档不是说直接当做系统UItextfield使用即可么?!
from vehicle-keyboard-ios.
同问:textfield放在UICollectionViewCell上面,不用这个键盘的话会走textField的代理方法,如果用了就不走了,textFieldShouldReturn也不见调起
from vehicle-keyboard-ios.
虽然我在使用时解决了这个问题,但还是希望作者维护的时候能把这个功能完善下。支持开源!加油
from vehicle-keyboard-ios.
虽然我在使用时解决了这个问题,但还是希望作者维护的时候能把这个功能完善下。支持开源!加油
在UITableViewCell或者UICollectionViewCell里面,添加系统键盘弹出/收起观察者:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardDidShow:)
name: UIKeyboardDidShowNotification
object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardDidHide:)
name: UIKeyboardDidHideNotification
object:nil];
///实现观察方法
-
(void)keyboardDidShow:(NSNotification *)notif {
NSLog(@"键盘打开");
} -
(void)keyboardDidHide:(NSNotification *)notif {
NSLog(@"键盘关闭");
///在这里拿到textField的值进行显示或回传Controller,因为键盘收起其实就是确定和完成都包含的动作,取值时机相同。
}
from vehicle-keyboard-ios.
在1.0.7版本,已解决。新增系统输入框车牌键盘的一些事件监听。
from vehicle-keyboard-ios.
Related Issues (18)
- 使用Swift版本后模拟器iOS10一下编译通过但是运行崩溃(iOS10+编译运行都没问题),以前使用的OC 版本没问题,项目本身也是OC 项目
- 偶现整体向上偏移 textField输入光标会出现
- 差一个教练车【学】例:京A00001学 HOT 1
- 未适配iPhoneXR设备 HOT 2
- 谢谢老哥,提供这么好的库,解决我的燃眉之急,为啥github首页搜索尽然搜索的之前的一个已经停更的库地址, HOT 1
- 键盘正则禁用有点问题 HOT 1
- 全面屏底部间距调整 HOT 2
- 建议 HOT 3
- 检测规则能否替换呢
- self.myTextField.plateChange这句根本不能用啊 HOT 2
- 键盘消失通知监听回调出无效,代码判断是否有问题,问题代码段如下: HOT 1
- 希望能支持swiftui HOT 1
- vehicleKeyBoardBecomeFirstResponder,手动弹出键盘方法无效
- 你好 ios三方有报错 HOT 1
- pod 没有search到PWKeyboard
- 下一个版本能否支持新能源车牌输入呢? HOT 1
- 民用车型可否增加 “挂” HOT 2
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 vehicle-keyboard-ios.