如何创建像 UITextField 一样的 UITableViewCell?
如何以编程方式或使用 Interface Builder 创建像 UITextField
一样的 UITableViewCell
?
我尝试使用 Interface Builder,但似乎不起作用:
How can I create a UITableViewCell
like a UITextField
programmatically or using Interface Builder?
I tried with Interface Builder but it seems it doesn't work:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
子类化 UITableViewCell 并将 UITextField 添加到单元格的 contentView 中。如果不创建自己的 tableViewCell,您可能无法获得结果。
示例:
MyAwesomeTextfieldCell.h
MyAwesomeTextfieldCell.m
Subclass UITableViewCell and add a UITextField to the cell's contentView. You probably won't get your result without creating your own tableViewCell.
example:
MyAwesomeTextfieldCell.h
MyAwesomeTextfieldCell.m