我正在執行AQGridView,並且一切進展順利。分配給'readonly'屬性的屬性不允許
但是,現在我得到下面的錯誤。
- (AQGridViewCell *) gridView: (AQGridView *)inGridView cellForItemAtIndex: (NSUInteger) index;
{
MagazineCell *cell = (MagazineCell *)[inGridView dequeueReusableCellWithIdentifier:@"cell"];
if (!cell) {
cell = [MagazineCell cell];
cell.reuseIdentifier = @"cell";
//Assigning to property with 'readonly' atribute not allowed
}
cell.backgroundColor = [UIColor clearColor];
cell.selectionStyle = AQGridViewCellSelectionStyleGlow;
cell.edicaoLabel.text = [[edicoesArray objectAtIndex:index] name];
cell.dataLabel.text = [[edicoesArray objectAtIndex:index] name];
return cell;
}
我試圖做這個頭文件
@property(nonatomic, readwrite) NSString * reuseIdentifier;
我也試過
@property(nonatomic, assign) NSString * reuseIdentifier;
,但仍然沒有工作。
我下載項目的德如'演員爲Netflix的https://github.com/adrianco/Actors-for-Netflix-on-iPad/
而這種代碼有同樣的問題,當我嘗試建立和預處理器也看不到了。
這個例子不聲明屬性在類文件頭上,我試圖在我的項目上試圖解決這個問題。
有人可以看到有什麼問題?
謝謝!