이 코드가 있습니다 NSString * localStringValue; 내가 체크 표시가 there.localStringValue 경우 내가 셀을 누를 때-문서를 Google에 localStringValue을 동기화하고이 코드에 DidSelectRowAtIndexPath에서 버튼 클릭 동작으로 문자열 전달
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
localStringValue = [m_textfield cellForRowAtIndexPath:indexPath].textLabel.text;
localStringValue = [m_textfield cellForRowAtIndexPath:indexPath].detailTextLabel.text;
NSArray* toReload = [NSArray arrayWithObjects: indexPath, self.selectedIndexPath, nil];
self.selectedIndexPath = indexPath;
if ([[tableView cellForRowAtIndexPath:indexPath] accessoryType] == UITableViewCellAccessoryCheckmark){
UploadView *uploadview = (UploadView *)self.view;
if (uploadview != nil)
{
[m_owner uploadString:localStringValue];
//[self dismissModalViewControllerAnimated:YES];
}
[[m_textfield cellForRowAtIndexPath:indexPath] setAccessoryType:UITableViewCellAccessoryNone];
}
else {
[[tableView cellForRowAtIndexPath:indexPath] setAccessoryType:UITableViewCellAccessoryCheckmark];
}
}
이 일이 나의 필요를 point.But에서 잘 작동하는있는 tableview의 cell.Every의 값을 포함 사용자가 내가 localStringValue의 모든 값을 원하는 여러 행을 선택하고
- (IBAction)doUpload:(id)sender
{
UploadView *uploadview = (UploadView *)self.view;
if (uploadview != nil)
{
[m_owner uploadString:@""];
//[self dismissModalViewControllerAnimated:YES];
}
}
내가 [m_owner uploadString:localstringvalue];
방법에 localstringvalue 전달하려면이 코드를 통해이를 전달하면 내가 버튼 클릭이 값을 전달하려는 것입니다, 즉 의미 이것을하기 위해? 사전에 감사합니다.
"인터페이스 유형 문자열을 값으로 전달할 수 없습니다."NSString을 잊었습니까? "이것은 내 오류이며 선언되지 않은 localstring입니다. – ICoder