- (IBAction)doUpload:(id)sender
{
NSMutableArray *selected_items = [[NSMutableArray alloc] init];
for (int i = 0; i<[appDelegate.notesArray count]; i++) {
if (selected[i]) [selected_items addObject:[appDelegate.notesArray objectAtIndex:i]];
UploadView *uploadview = (UploadView *)self.view;
if (uploadview != nil)
{
[m_owner uploadString:here i want to pass the value];
//[self dismissModalViewControllerAnimated:YES];
}
}
}
在我的移動代碼,我想從UITableView中傳遞多個值[m_owner uploadString:在這裏,我要傳遞的值];但我只BLE字符串回教GDoc如何將mutbleArray轉換或分割爲Uplod字符串? 我DidSelecetRowAtIndexPathe代碼如下所示轉換MutbleArray到的NSString在iPhone的SDK
NSUInteger row = [indexPath row];
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
if (cell.accessoryType == UITableViewCellAccessoryCheckmark) {
cell.accessoryType = UITableViewCellAccessoryNone;
selected[row] = NO;
}
else {
cell.accessoryType = UITableViewCellAccessoryCheckmark;
selected[row] = YES;
}
[tableView deselectRowAtIndexPath:indexPath animated:YES];
我不明白這一點。請儘量使用更合適的英語。另外,你的目標是什麼?你想將一個NSMutableArray的元素連接成一個NSString? – 2011-12-11 14:56:13