I have two class `first` class and `second` class
I have created 3 section on `tableview` cell for display different value
If I select on section 0 and `indexpath.row` 0 then it push me on `second` class where I have all name list in `tableview` if i select any name then that name should display on first class on section 0 after it happen then i can sent this display value to server please help me on this
what i have to write on second class this method:
私はこのエラーを取得 - [空港isEqualToStringは:]:認識されていないセレクタはインスタンスに送信0x4e54760 2011-09-16 16:44:37.693 RegexKitLiteDemo [36975:207] *によりキャッチされない例外 'NSInvalidArgumentException'、理由にアプリを終了: ' - [isEqualToString空港:]:認識されないセレクターインスタンス0x4e54760に送ら'は、iPhoneの最初のクラスindexpath.rowに第二のクラスから選択された値を送信する方法
this is my Tfirst.m file
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
{
NSLog(@"accessory selected");
if ([indexPath section] == 0)
{
// load the appropriate view for the accessory selected
if ([indexPath row] == 0)
{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(nameControllerDidSelect:) name:NameControllerDidSelectNotification object:viewtwo];
viewtwo=[[Originstart alloc]initWithNibName:@"Originstart" bundle:nil];
[self.navigationController pushViewController:viewtwo animated:YES];
[viewtwo release];
}
else{
NSLog(@"accessory right");
}
//[self.navigationController pushViewController:self.approve animated:YES];
}
}
my Origin.m file
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier] autorelease];
}
a=(airport*)[app.lstAirports objectAtIndex:indexPath.row];
NSLog(@"str:%@",a);
cell.textLabel.text =a.Name;
cell.detailTextLabel.text=a.Code;
// Configure the cell...
return cell;
}
#pragma mark -
#pragma mark Table view delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
a.Name = [app.lstAirports objectAtIndex:indexPath.row];
// Send notification of new selection
NSDictionary *userDict = [NSDictionary dictionaryWithObject:a.Name forKey:@"Name"];
NSLog(@"str:%@",userDict);
[[NSNotificationCenter defaultCenter] postNotificationName:NameControllerDidSelectNotification object:self userInfo:userDict];
}
構文を使用して投稿を書くことはできますか? – beryllium