そのセルで左または右にスワイプして、カスタム テーブル セルのカスタム ビューを単純にアニメーション化したかったのです。xib からセルをロードしています。
これは、xib からセルに入力するために使用したコードです。
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"CellIdentifier";
CustomCell *CustomCell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (CustomCell == nil)
{
NSArray *cells =[[NSBundle mainBundle] loadNibNamed:@"CustomCell" owner:nil options:nil];
for (UIView *view in cells)
{
if([view isKindOfClass:[UITableViewCell class]])
{
CustomCell = (CustomCell *)view;
break;
}
}
}
CustomCell.textLabel.Text = @"this is a text";
return CustomCell;
}
必要なのは、セルをスワイプしてボタン付きの背景ビューを表示することです。これに関する多くのチュートリアルを検索して見つけましたが、xibでカスタムセルを使用しているものはありません。