相关疑难解决方法(0)

编辑模式下的自定义UITableViewCell不会移动我的UILabel

这是我的头脑:-)

我有一个功能齐全的CoreData填充UITableView内部UIViewController,我已经成功实现了"滑动删除选项"(这很简单),我还可以删除单个实例,其中有一个编辑按钮,红色圆圈内容出现.

我的问题是,我认为这是因为我有一个CustomCell,当我按下编辑按钮时,UILabels不要向右移动.

我尝试过使用-(void)layoutSubViews和其他一些,但没有任何作用.

我已经发布了我的代码cellForRowAtIndexPath.这是我的应用程序中的注释部分的一部分.这段代码有效,我只需要知道当我进入编辑模式时如何移动标签?

谢谢你的提示和建议:-)

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *cellIdentifier = @"Cell";

MNCustomCell *cell = [_mainTableView dequeueReusableCellWithIdentifier:cellIdentifier forIndexPath:indexPath];
if (cell == nil) {
    cell = [[MNCustomCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
}


//cell.textLabel.text = [_tableArray objectAtIndex:indexPath.row];

MNotes *mnotes = [[self fetchedResultsController] objectAtIndexPath:indexPath];

cell.noteTitle.text = mnotes.noteTitleString;
cell.noteSummary.text = mnotes.mainNoteString;

mnotes.createDate = [[NSDate alloc] init];
SORelativeDateTransformer *relativeDateTransformer = [[SORelativeDateTransformer alloc] init];
NSString *relativeDate = [relativeDateTransformer transformedValue:mnotes.createDate];

cell.noteDate.text …
Run Code Online (Sandbox Code Playgroud)

iphone edit uitableview custom-cell ios

9
推荐指数
1
解决办法
8413
查看次数

标签 统计

custom-cell ×1

edit ×1

ios ×1

iphone ×1

uitableview ×1