Giter Club home page Giter Club logo

xwtextviewautoheight's Introduction

XWTextViewAutoHeight

一行代码实现UITextView自适应高度

使用类别的方式实现自动改变textview的高度,实现0侵入

使用方式:

  1. 将本项目中的 UITextView+AuotHeight 文件夹中的代码拷贝至你的项目

  2. 导入 #import "UITextView+XWAutoHeight.h" 头文件到你所需要用的textview所在的文件

  3. 使用textview实例,调用开启自动改变高度方法,如下:

  • (void)autoChangeWithMinHeight:(CGFloat)minHeight maxHeight:(CGFloat)maxHeight changeBlock:(XWChangeHeightBlock)changeHeightBlock; 这个方法只能调用一次,调用多次的话,只有第一次的生效。
  1. changeHeightBlock 是高度改变后的回调。

xwtextviewautoheight's People

Contributors

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