Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 单元格内容重叠SWTableViewCell按钮_Ios_Objective C_Uitableview - Fatal编程技术网

Ios 单元格内容重叠SWTableViewCell按钮

Ios 单元格内容重叠SWTableViewCell按钮,ios,objective-c,uitableview,Ios,Objective C,Uitableview,我正在尝试使用xib文件中的自定义单元格将SWTableViewCell实现到我的UITableView中。但是现在发生的情况是,单元格内容没有像它应该的那样扫向左侧。因此,内容与按钮重叠。如图所示: 我试过很多方法来解决这个问题。 以下是我在CellForRowatineXpath中的代码: - (UITableViewCell *) tableView:(UITableView *) tableView cellForRowAtIndexPath:(NSIndexPath *) index

我正在尝试使用xib文件中的自定义单元格将
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为什么不以回复的形式发布,这样他就可以接受?