Objective c 在自定义单元格xcode中定位动态图像和文本

Objective c 在自定义单元格xcode中定位动态图像和文本,objective-c,xcode,uitableview,dynamic,custom-cell,Objective C,Xcode,Uitableview,Dynamic,Custom Cell,我正在编写一个应用程序,其中人员显示在表视图中 这是picturelistmantable.m中的代码 // Get the core data object we need to use to populate this table cell Pictures *currentCell = [pictureListData objectAtIndex:indexPath.row]; UIImageView *myImg = (UIImageView *)[cell viewWithTag:1

我正在编写一个应用程序,其中人员显示在表视图中

这是picturelistmantable.m中的代码

// Get the core data object we need to use to populate this table cell
Pictures *currentCell = [pictureListData objectAtIndex:indexPath.row];

UIImageView *myImg = (UIImageView *)[cell viewWithTag:100];




//  Fill in the cell contents
cell.textLabel.text = [currentCell title];
cell.detailTextLabel.text = [currentCell desc];
cell.imageView.contentMode = UIViewContentModeScaleAspectFit;
cell.imageView.image = [UIImage imageWithData:[currentCell smallPicture]];



cell.telephoneNumber = [currentCell desc];

cell.delegate = self;

return cell;
我正在努力实现这样的目标:


关于我应该做什么有什么想法吗?

你有什么具体问题吗?我不确定如何实现这个定位,目前图像和标题并排放置,你只需按你想要的方式定位即可。图像视图和标签都应具有centerX约束。图像视图需要单元格顶部的约束,可能还需要高度和宽度约束。标签应该在单元格底部有一个约束。你能给我一个例子吗,因为我是新手?对不起,这不容易写,因为你都是在IB中完成的。如果你不知道如何使用自动布局,你应该看2012年WWDC关于这个主题的3个视频。