Have created an attribute property in TableView1.h and pushing that attributes value to another view name TableView2. How can I access the Start attribute property in another view name TableView2.m.
In TableView1.h
@interface TableView1 : UIViewController{
NSString *Start;
}
@property (nonatomic, retain) NSString *Start;
In TableView1.m
@synthesize Start;
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
TableView2 *view2 = [[[TableView2 alloc] initWithNibName:@"TableView2" bundle:[NSBundle mainBundle]] autorelease] ;
view2.Start = [ NSString stringWithFormat:@"%@", [self.Array objectAtIndex:indexPath.row]];
[appDelegate.navController pushViewController:view2 animated:YES];
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
You should not define property Start in TableView1
In TableView2.h
In TableView2.m
In TableView1.m
In TableView2.m just access
self.start