Code Monkey home page Code Monkey logo

textview-keyboard's Introduction

image


文本域键盘躲避者


### 版本信息 .Swift 1.2
.Xcode 6.3
.基于MIT开源协议

请支持我,写满80个框架,从此‘封笔’


### 效果图 ![image](https://github.com/nsdictionary/Resource/blob/master/TextView-KeyBoard/1.gif)

### OC版本 之前写过OC版本的[TextField组键盘躲避者](https://github.com/nsdictionary/CoreTFManagerVC)




一句代码集成


####您的UITextView 无需继承任何基类!一句代码即可集成:
TextViewKeyBoardVC().avoid(inVC: self, scrollView: nil, textView: textView, offsetY: 10)

###细节说明:

  1. scrollView已经处理,请根据您的情况传入。

  2. offsetY是框架的特色,有的时候您的UITextView下方可能有提示文字或者事件按钮,你可以预留更多的空间。

  3. 键盘工具条已经封装,想要修改上面的文字如下:

     let tkb = TextViewKeyBoardVC()
     tkb.msg = "请输入意见"
    

4. 框架基于通知和代理,生命周期已经管理,你无需担心取消通知监听。
5. 框架设置了textView的代理,请不要自行再设置代理,需要代理?放心,closure已经考虑了这个问题:
    /** 开始编辑 */
    tkb.textViewWillBeginEditlosure = {textView in
        
    }
    
    /** 文字改变 */
    tkb.textViewDidChangeClosure = {textView in
        
    }
    
    /** 结束编辑 */
    tkb.textViewDidEndEditClosure = {textView in
    
    }




我的事业

西成的事业,渺小而艰难的求生存。前期我们专做全国的移动app外包。如果您能在信息上援助我们,我们万分感谢您的帮助!
西成:http://ios-android.cn
我的个人微博:http://weibo.com/charlin2015/


三群: 474377358
四群: 347446259
西部省市朋友加群号: 473185026(实名)
swift群: 467237044

textview-keyboard's People

Contributors

charlinfeng avatar

Watchers

James Cloos avatar yugh avatar

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.