如何保持UITableViewCell
textLabel位置固定在滑動狀態,同時使用默認UITableViewCell
。如何保持UITableViewCell textLabel位置固定在滑動狀態?
在滑動textLabel
文本向左和向外移動屏幕。
相關代碼:
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
// Return YES if you want the specified item to be editable.
return YES;
}
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
if (editingStyle == UITableViewCellEditingStyleDelete) {
//code related to delete row
}
}
支票影像低於清醒的認識:
刷卡前:
刷卡後:
@Ronak這是默認設置。如果你想在滑動後想看到可見的標籤值,那麼在滑動後改變UILabel Position意味着像這樣設置frame'self.lbl.frame = CGRectMake(100,5,50,10)'。 –
在setEditing方法中,您可以調整文本標籤的約束和框架 – Flipper
'問題可以被標記爲無效'您能解釋爲什麼嗎?@Sharpkits –