来源:Licence:MIT平台:iOS设备:iPhone / iPad作者:Andrew Sardone
UITextField 属于 UIControl,所以我们可以给 UITextField 加上一个target action(利用 addTarget 方法)。而 UITextView 不是 UIControl,所以没有 addTarget 方法,所以要响应输入动作,只能通过delegate。这份代码能够将 UITextView 变成类似 UITextField 那样,可以通过 addTarget 方法来加入输入响应。可以加入的target action是: UICont
评论0
最新资源