チェックボックスで小さなコンセプトをやっています。実際、チェックボックスの画像をテーブルのセルに配置しましたが、特定のチェックボックスを選択してテーブルビューでセルの値を取得する方法がわかりません。この問題を解決することで、どのような人も助けてくれますか。テーブルビューのスクリーンショットにコーディングを提供し、
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSLog(@"in table view cell for row at index");
RequestSongSelectingCell *cell = (RequestSongSelectingCell *) [tableView dequeueReusableCellWithIdentifier:@"requestsingcell"];
if (cell==nil)
{
[[NSBundle mainBundle] loadNibNamed:@"RequestSongSelectingCell" owner:self options:nil];
NSLog(@"start");
cell=requestingCell;
NSLog(@"end");
}
NSDictionary *dict=[self.array objectAtIndex:indexPath.row];
NSString *artistname=[dict objectForKey:@"artist"];
NSLog(@"artistname is %@",artistname);
cell.artistName.text=artistname;
NSString *songtitle=[dict objectForKey:@"title"];
NSLog(@"songtitle is %@",songtitle);
cell.artistTitle.text=songtitle;
return cell;
}
-(IBAction)checkButtonPressed:(id)sender
{
NSLog(@"check box button pressed");
requestingCell.checkBoxButton.imageView.image=[UIImage imageNamed:@"checkbox-checked.png"];
}
ありがとう、よろしく、
ギリッシュ