How do I set a detail view's title from the selected row?

You have extra square brackets. Try this: (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { MObjectDetailVC *mObjectDetailViewController = MObjectDetailVC alloc initWithNibName:@"MObjectDetailVC" bundle:nil; mObjectDetailViewController. DetailURL=mcData objectAtIndex:indexPath.

Section objectAtIndex:indexPath. Row object. Url; mObjectDetailViewController.

Title=mcData objectAtIndex:indexPath. Section objectAtIndex:indexPath. Row object.Name; self.

NavigationController pushViewController:mObjectDetailViewController animated:YES; mObjectDetailViewController release; }.

You have extra square brackets. Try this: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { MObjectDetailVC *mObjectDetailViewController = MObjectDetailVC alloc initWithNibName:@"MObjectDetailVC" bundle:nil; mObjectDetailViewController. DetailURL=mcData objectAtIndex:indexPath.

Section objectAtIndex:indexPath. Row object. Url; mObjectDetailViewController.

Title=mcData objectAtIndex:indexPath. Section objectAtIndex:indexPath. Row object.Name; self.

NavigationController pushViewController:mObjectDetailViewController animated:YES; mObjectDetailViewController release; }.

At the end of the lines that were giving me issue, I called object. Url and object.name. This was unnecessary and invalid.

I just needed to put url and name to get those variables from my selected object. Thanks for your help!

I have a table view made up of an NSArray of instances of a custom object. When a row in the table view is tapped, it is supposed to trigger a detail view made up of a web view. So, in MainViewController.

However, I get an error for both that start with mObjectDetailViewController: Expected '' before '.' token. And I don't know why. Can you help?

UPDATE: I reduced the amount of square brackets, but I still have the error on each of those lines. It's just that instead of 3 of that error on each line, there's just one instance for each.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions