GithubHelp home page GithubHelp logo

Comments (8)

yzhtracy avatar yzhtracy commented on June 25, 2024

如果是使用的UItextField,因为用的非系统键盘 ,所以不会走UItextfield的代理。可以通过kvo来监听它的text值。

from vehicle-keyboard-ios.

Gerhard94 avatar Gerhard94 commented on June 25, 2024

如果是使用的UItextField,因为用的非系统键盘 ,所以不会走UItextfield的代理。可以通过kvo来监听它的text值。

尝试过 没有调起kvo的方法

from vehicle-keyboard-ios.

noveleven avatar noveleven commented on June 25, 2024

@yzhtracy text可以kvo,但是 textFieldShouldReturn: 也没见调用啊

from vehicle-keyboard-ios.

noveleven avatar noveleven commented on June 25, 2024

文档不是说直接当做系统UItextfield使用即可么?!

from vehicle-keyboard-ios.

Tian-WJ avatar Tian-WJ commented on June 25, 2024

同问:textfield放在UICollectionViewCell上面,不用这个键盘的话会走textField的代理方法,如果用了就不走了,textFieldShouldReturn也不见调起

from vehicle-keyboard-ios.

Free-am avatar Free-am commented on June 25, 2024

虽然我在使用时解决了这个问题,但还是希望作者维护的时候能把这个功能完善下。支持开源!加油

from vehicle-keyboard-ios.

Free-am avatar Free-am commented on June 25, 2024

虽然我在使用时解决了这个问题,但还是希望作者维护的时候能把这个功能完善下。支持开源!加油

在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.

yzhtracy avatar yzhtracy commented on June 25, 2024

在1.0.7版本,已解决。新增系统输入框车牌键盘的一些事件监听。

from vehicle-keyboard-ios.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.