1
付属のサンプルに基づいてAQGridViewを実装しています。しかし、私はxibsで働いている、との例では、コードは次のとおりです。AQGridView:セルを初期化する方法
if (plainCell == nil)
{
plainCell = [[[ImageDemoGridViewCell alloc] initWithFrame: CGRectMake(0.0, 0.0, 200.0, 150.0)
reuseIdentifier: PlainCellIdentifier] autorelease];
plainCell.selectionGlowColor = [UIColor blueColor];
}
plainCell.image = [UIImage imageNamed: [_imageNames objectAtIndex: index]];
cell = plainCell;
}
私のコードは次のようになります。
- (AQGridViewCell *) gridView: (AQGridView *)inGridView cellForItemAtIndex: (NSUInteger) index
{
static NSString * FilledCellIdentifier = @"FilledCellIdentifier";
AQGridViewCell * cell = nil;
MagazineCell * filledCell = (MagazineCell *)[gridView dequeueReusableCellWithIdentifier: FilledCellIdentifier];
if (filledCell == nil) {
}
filledCell.edicaoLabel.text = [[data objectAtIndex:index] name];
cell = filledCell;
return (cell);
}
例InitWith CGRectが、どのように初期化私はxibsで作業するときのセルですか?