Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 无法在Xcode6中设置UITableViewCell,因为“自动属性合成将不会合成属性…”警告_Ios_Objective C_Uitableview_Xcode6 - Fatal编程技术网

Ios 无法在Xcode6中设置UITableViewCell,因为“自动属性合成将不会合成属性…”警告

Ios 无法在Xcode6中设置UITableViewCell,因为“自动属性合成将不会合成属性…”警告,ios,objective-c,uitableview,xcode6,Ios,Objective C,Uitableview,Xcode6,我在Xcode 6中创建了一个新项目,并收到了一个警告,我无法解决。我只想设置一个自定义UITableViewCell,就像我在Xcode 5中做了1000次一样 我已经创建了一个UITableViewController和一个UITableViewCell 将UILabel拖到TableViewCell.h中 现在我在TableViewCell.h中得到了以下警告 自动属性合成不会合成属性“textLabel” 因为它是“readwrite”,但它将通过 另一个属性 这是我从Interface

我在Xcode 6中创建了一个新项目,并收到了一个警告,我无法解决。我只想设置一个自定义UITableViewCell,就像我在Xcode 5中做了1000次一样

我已经创建了一个UITableViewController和一个UITableViewCell 将UILabel拖到TableViewCell.h中 现在我在TableViewCell.h中得到了以下警告

自动属性合成不会合成属性“textLabel” 因为它是“readwrite”,但它将通过 另一个属性

这是我从Interface Builder中拖出的UILabel

@property (weak, nonatomic) IBOutlet UILabel *textLabel;

如何解决此警告?我以前从未见过它,它在Xcode 5中工作得非常好。

要么更改属性名称,这样就不会对现有属性进行验证,要么添加

@synthesize textLabel = _textLabel;

最好用不同的方式命名它。

或者更改属性名称,这样就不会更改现有的属性名称,或者添加

@synthesize textLabel = _textLabel;

最好用另一种方式来命名。

@Kampai我不想使用@synthesis,我从来没有这样做过。我一直使用self.propertyName,从未得到任何警告。@Kampai我不想使用@synthesis,我从来没有这样做过。我一直使用self.propertyName,从未收到任何警告。因此这不是Xcode问题,而是我错了,因为textLabel是UILabel的现有属性,我与新属性进行了复制?是的,更准确地说,这是因为原始属性是只读的,而您添加的是readwrite。所以这不是Xcode问题,相反,我错了,因为textLabel是UILabel的一个现有属性,我用新属性复制了它?是的,更准确地说,这是因为原始属性是只读的,而您添加的是readwrite。