-1

すべてのオブジェクトを表示するテーブル ビューがあり、オブジェクトを削除できます。NSMutableArray からオブジェクトを編集し、テーブル データを保存して再ロードできるように、それを取得する必要があります。

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *CellIdentifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
    AssignmentInfo *ai = [self.alist objectAtIndex:indexPath.row];
    UILabel *classname = (UILabel *)[cell viewWithTag:1];
    UILabel *assignementText = (UILabel *)[cell viewWithTag:2];
    UILabel *date = (UILabel *)[cell viewWithTag:3];

    classname.text = ai.className;
    assignementText.text = ai.assignmentTitle;
    date.text = ai.dateTimeString;
    // Configure the cell...

    return cell;
}

必要に応じて、プロジェクト全体へのリンクを次に示します。

http://www.abdelelrafa.com/AssignmentAppTwo.zip

4

2 に答える 2

-1

カスタム アニメーションが必要ない場合は、単純にオブジェクトをオブジェクトから削除し、オブジェクトのメソッドをNSMutableArray呼び出します。reloadDataUITableView

于 2013-10-21T23:42:18.300 に答える