我想我已经完成了所有步骤,但我一定遗漏了一些东西,因为我无法将单元格中的标签与代码建立联系.
I think I got all the steps down but I must be missing something because I can't make a connection from the labels in the cell to the code.
这就是我正在做的事情:
Here's what I'm doing:
我错过了什么?
将标签声明为自定义单元格类中的属性.在表格视图控制器中,alloc 或 dequeue 将单元格作为您的自定义类型,而不是作为 UITableViewCell.在 Xcode 故事板中,控制从单元格本身(例如,最右下角)拖动到单元格中的标签以连接插座.
Declare the label as a property in the custom cell class. In the table view controller, alloc or dequeue the cell as your custom type, not as UITableViewCell. In the Xcode storyboard, control drag from the cell itself (for example, the far bottom right corner) to the label that is in the cell to connect the outlet.
这篇关于故事板中的自定义 uitableviewcells的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
如何通过点击动画 UIImageview 以显示全屏?How to animate a UIImageview to display fullscreen by tapping on it?(如何通过点击动画 UIImageview 以显示全屏?)
停止 segue 并显示警报To stop segue and show alert(停止 segue 并显示警报)
iOS 5 故事板,以编程方式确定路径iOS 5 storyboard, programmatically determine path(iOS 5 故事板,以编程方式确定路径)
图标已经包含光泽效果Icon already includes gloss effects(图标已经包含光泽效果)
UIEdgeInsetsMake 是如何工作的?How does UIEdgeInsetsMake work?(UIEdgeInsetsMake 是如何工作的?)
UIProgressView 和自定义跟踪和进度图像(iOS 5 属性UIProgressView and Custom Track and Progress Images (iOS 5 properties)(UIProgressView 和自定义跟踪和进度图像(iOS 5 属性))