So, I have one ViewController
that has a TableView
populate with an Array (_vinhoArray
) and another TableViewController
that opens when a user taps a row in this first ViewController
.
What I want is set the title of second View ( TableViewController
) for the name of row selected.
In this first one I have this code.
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSString *selectedRow = [_vinhoArray objectAtIndex:indexPath.row];
// SubTable is the name of Second View
SubTable *subTable = [[SubTable alloc] init];
subTable.titleView = selectedRow;
}
In the second view a have a property set
@property (nonatomic, strong) NSString *titleView;
In the -(void)viewDidLoad
I have this code
self.title = titleView;
But nothing shows in the title of the Second View (TableViewController
)
Thats it! Please Help