Adding UITextField to UITableViewCell

馋奶兔 提交于 2019-12-11 01:54:13

问题


I've looked through countless SO answers on this subject and cannot find what I am looking for.

I have a view I created in a xib file. It has a UITableView as a subview. I hooked up the delegate and data delegates to the controller and it works.

Now, I want to load a custom cell in the UITableView - the cell needs to have a UILabel a UITextField and three UIButtons that are only visible when a condition is met. My question is simply this:

Can I create a custom cell in a separate xib file with these elements that I need - the load it in the tableview and connect the UI elements to my viewController?

I've tried the above but IB does not allow me to make connections to my view controller.

Can anyone gov me some tips here?

Thanks!


回答1:


For reference,

Custom TableViewCell tutorial 1

Custom TableViewCell tutorial 2



来源:https://stackoverflow.com/questions/21549050/adding-uitextfield-to-uitableviewcell

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!