Answers
为了答好楼主的题目我自己写了个测试,请看效果图

实现原理在这里, command + shit + O 输入 UITextField.h 在第94行
我这里用了
UILabel
,理论上只要是UIView类都可以
self.nameField.inputAccessoryView = _dingdingLabel;
objc
// Presented when object becomes first responder. If set to nil, reverts to following responder chain. If // set while first responder, will not take effect until reloadInputViews is called. @property (readwrite, retain) UIView *inputView; @property (readwrite, retain) UIView *inputAccessoryView;
我萌你妹啊
answered 9 years, 11 months ago