Я создал одно приложение под названием обои в этих приложениях. Я просматриваю изображение с помощью JSON и просматриваю в таблице.
как кодекс:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cachedCell"];
if (cell == nil){
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:@"cachedCell"] autorelease];
}
cell.textLabel.text = [photoTitles objectAtIndex:indexPath.row];
cell.textLabel.font = [UIFont systemFontOfSize:13.0];
cell.text = [photoTitles objectAtIndex:indexPath.row];
cell.font = [UIFont systemFontOfSize:13.0];
NSData *imageData = [photoSmallImageData objectAtIndex:indexPath.row];
cell.imageView.image = [UIImage imageWithData:imageData];
cell.image = [UIImage imageWithData:imageData];
// cell.accessoryType
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
cell.selectionStyle = UITableViewCellSelectionStyleGray;
return cell;
}
Но я хочу изменить стиль просмотра, т. Е. Вид сетки. Я не могу сделать вид сетки, если есть какие-либо идеи, как создать вид сетки. Помогите мне с кодом, я буду благодарен.