2011-12-07 11 views
0

ハワイ私はそれにいくつかのデータでテーブルビューを持っている、私はグーグルドックとそれを同期する、私の必要性は、ユーザーがテーブルビューのセルで複数の選択を選択し、Gdoc.Soにそれらのノートをエクスポートすることができますテーブルビューでの複数の選択に目盛りまたはチェックマークが付いていますか? 。前もって感謝します。UITableViewで複数選択を有効にするにはどうすればよいですか?

+0

可能な複製http://stackoverflow.com/questions/308081/is-it-possible-to-configure-a-uitableview-to-allow-multiple-selection –

答えて

2

私たちは

@property (retain) NSIndexPath* selectedIndexPath; 

おかげin.h selectedindexpathのプロパティを設定する必要が解決

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 
    NSArray* toReload = [NSArray arrayWithObjects: indexPath, self.selectedIndexPath, nil]; 
    self.selectedIndexPath = indexPath; 
    if ([[tableView cellForRowAtIndexPath:indexPath] accessoryType] == UITableViewCellAccessoryCheckmark){ 

     [[tableView cellForRowAtIndexPath:indexPath] setAccessoryType:UITableViewCellAccessoryNone]; 
    } 

    else { 

     [[tableView cellForRowAtIndexPath:indexPath] setAccessoryType:UITableViewCellAccessoryCheckmark]; 

    } 

を見つけました。

関連する問題