|
一个强大的UITextView分类,三大功能,让系统TextView自带placeholder属性、自动高度、支持输入图片
License: MIT License
2017-07-18 09:58:49.211 JiDing[1213:105514] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'An instance 0x7fd88b905200 of class UITextView was deallocated while key value observers were still registered with it. Current observation info: <NSKeyValueObservationInfo 0x600000420f00> (
<NSKeyValueObservance 0x600000253e90: Observer: 0x7fd88b905200, Key path: frame, Options: <New: YES, Old: NO, Prior: NO> Context: 0x0, Property: 0x600000253ec0>
<NSKeyValueObservance 0x600000254040: Observer: 0x7fd88b905200, Key path: bounds, Options: <New: YES, Old: NO, Prior: NO> Context: 0x0, Property: 0x600000254070>
<NSKeyValueObservance 0x600000254130: Observer: 0x7fd88b905200, Key path: font, Options: <New: YES, Old: NO, Prior: NO> Context: 0x0, Property: 0x600000254160>
<NSKeyValueObservance 0x600000253f80: Observer: 0x7fd88b905200, Key path: text, Options: <New: YES, Old: NO, Prior: NO> Context: 0x0, Property: 0x600000254220>
<NSKeyValueObservance 0x600000254190: Observer: 0x7fd88b905200, Key path: textAlignment, Options: <New: YES, Old: NO, Prior: NO> Context: 0x0, Property: 0x6000002542e0>
<NSKeyValueObservance 0x600000254250: Observer: 0x7fd88b905200, Key path: textContainerInset, Options: <New: YES, Old: NO, Prior: NO> Context: 0x0, Property: 0x600000254400>
)'
可以支持字数限制
[!] CocoaPods could not find compatible versions for pod "UITextView-WZB":
In Podfile:
UITextView-WZB (~> 1.1.1)
Specs satisfying the UITextView-WZB (~> 1.1.1)
dependency were found, but they required a higher minimum deployment target.
// if (self.placeholderView) {
// NSArray *propertys = @[@"frame", @"bounds", @"font", @"text", @"textAlignment", @"textContainerInset"];
// for (NSString *property in propertys) {
// [self removeObserver:self forKeyPath:property];
// }
// }
里面这段代码 Time一直无限叠加 直至卡死 释放不掉
右下角加一个统计字数 类似于这样最大字数10 2/10
字数限制有了吗?
在创建的时候需要设置placeholder和默认text时,存在placeholder的文字和text都显示的问题。
是否可以优化?
因为我没有设置placeholder,回调方法一直没有相应。还调试了半天。
求问怎么改变cell的高度
这样就会和MJRefresh 有冲突了,导致下拉刷新那个view 直接位移了
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.