简体   繁体   English

iOS表格视图以及UIViewController中的自定义原型单元

[英]iOS table view with custom prototype cell in a UIViewController

I'm trying to make a custom prototype reusable cell, but I can't drag and drop label, UIImageView or anything in my prototype, What am I doing wrong? 我正在尝试制作一个自定义的原型可重用单元格,但是无法拖放标签,UIImageView或原型中的任何内容,我在做什么错?

I have a ViewController, with a Title, special background and a button. 我有一个ViewController,带有标题,特殊背景和按钮。 In here i have a TableView, with a custom prototype cell. 在这里,我有一个TableView,带有一个自定义的原型单元。 I need to drag some Labels, and UIIMage in here - But I can't drop it on the prototype cell. 我需要将一些标签和UIIMage拖到此处-但不能将其放在原型单元上。

If you need any further details just ask and I'll gladly respond 如果您需要更多详细信息,请询问,我们将很乐意答复

I'll look forward for your help! 期待您的帮助! thanks in advance! 提前致谢!

Select the cell. 选择单元格。

Choose the Attributes Inspector. 选择“属性”检查器。

Change the Table View Cell's Style to Custom. 将表视图单元格的样式更改为自定义。

将单元格样式更改为自定义

Delete the tableview, close and open Xcode and try it again from a clear ViewController, sounds like you are doing everything ok to me, even thought this may help. 删除表格视图,关闭并打开Xcode,然后从一个清晰的ViewController中再次尝试,听起来好像您对我来说一切正常,甚至认为这样做可能会有所帮助。

TCKPIC上的STCK-19915627

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM