Ios 单元格内容重叠SWTableViewCell按钮
我正在尝试使用xib文件中的自定义单元格将Ios 单元格内容重叠SWTableViewCell按钮,ios,objective-c,uitableview,Ios,Objective C,Uitableview,我正在尝试使用xib文件中的自定义单元格将SWTableViewCell实现到我的UITableView中。但是现在发生的情况是,单元格内容没有像它应该的那样扫向左侧。因此,内容与按钮重叠。如图所示: 我试过很多方法来解决这个问题。 以下是我在CellForRowatineXpath中的代码: - (UITableViewCell *) tableView:(UITableView *) tableView cellForRowAtIndexPath:(NSIndexPath *) index
SWTableViewCell
实现到我的UITableView
中。但是现在发生的情况是,单元格内容没有像它应该的那样扫向左侧。因此,内容与按钮重叠。如图所示:
我试过很多方法来解决这个问题。
以下是我在CellForRowatineXpath中的代码:
- (UITableViewCell *) tableView:(UITableView *) tableView cellForRowAtIndexPath:(NSIndexPath *) indexPath
{
static NSString* cellIdentifier = @"PictureTableViewCell";
if (indexPath.section == 0){
return [super tableView:tableView cellForRowAtIndexPath:indexPath];
}else{
NSLog(@"%i",indexPath.row);
NSLog(@"%i",indexPath.section);
PictureTableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:cellIdentifier forIndexPath:indexPath];
[cell setCellHeight:cell.frame.size.height];
cell.containingTableView = tableView;
Image *tempImage = imagesArray[indexPath.row];
cell.image.image = [UIImage imageWithData:tempImage.image];
cell.lblDescription.text = tempImage.image_description;
NSLog(tempImage.image_description);
cell.rightUtilityButtons = [self rightButtons];
cell.delegate = self;
return cell;
}
ViewDidLoad:
- (void)viewDidLoad
{
[super viewDidLoad];
self.tableView.delegate = self;
self.tableView.dataSource = self;
// Do any additional setup after loading the view.
self.images = selectedReport.image;
imagesArray = [self.images.allObjects mutableCopy];
self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
[self.tableView registerNib:[UINib nibWithNibName:@"PictureCell" bundle:nil] forCellReuseIdentifier:@"PictureTableViewCell"];
}
如果有人能帮我,我将非常感激!
谢谢你的帮助 确保你手机的所有内容都被添加到手机的
contentView
中,而不是直接添加到手机中。@rmaddy,该死的上帝,我怎么没看到这个。我爱你谢谢你@rmaddy为什么不以回复的形式发布,这样他就可以接受?