Bu bir hata veriyor. Bu kısmı yapmaya çalışırken ilk defa, bu yüzden benimle birlikte ol.neden görüntümü bu kodla bir daireye kırpmama izin vermiyor?
Benim hata cell.image.frame...
olan:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
if (cell == nil) cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"cell"];
PFObject *group = groups[indexPath.row];
//if(group[PF_GROUP_LOGO] != nil){
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{ // go to a background thread to load the image and not interfere with the UI
UIImage *image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:group[PF_GROUP_LOGO]]]];
dispatch_async(dispatch_get_main_queue(), ^{ // synchronize back to the main thread to update the UI with your loaded image
cell.layer.cornerRadius = cell.image.frame.size.width/2;
cell.layer.masksToBounds = YES;
cell.imageView.image = image;
cell.textLabel.text = group[PF_GROUP_NAME];
cell.detailTextLabel.text = [NSString stringWithFormat:@"%d users", (int) [group[PF_GROUP_MEMBERS] count]];
cell.detailTextLabel.textColor = [UIColor lightGrayColor];
});
});
return cell;
}
Hata nedir? Ve özellikle hangi hat üzerinde oluyor? – Hamish