Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Chirone

macrumors 6502
Original poster
Mar 2, 2009
279
0
NZ
how do i get the navigation bar to show up on a table view?
i'm not using the tableview template
i made the table view controller myself
the table view and table view controller are set up exactly how it is in the template but it doesn't show up...
(ie, i made the file's owner set to the table controller's class, i linked the table view to the file's owner's view, and set it as the datasource and delegate)

clicking on a row in the table makes that row permanently highlighted until another row is highlighted, unlike the one that is from the template where it highlights like a button

needless to say when i select a row, even though the code gets fired, the view doesn't change to another view as it should, even though the commented out code is uncommented


all the tutorials on how to do this 'drill down' table start from the table view template, so none of them are any help
 
correct

one more thing... this should also be easy

when the row is touched, it's permanently highlighted. how to i make it highlight temporarily like other table views?
 
deselectRowAtIndexPath:animated:

correct

one more thing... this should also be easy

when the row is touched, it's permanently highlighted. how to i make it highlight temporarily like other table views?


i'll use the example from Erica Sadun's iPhone Developer's Cookbook (Chapter 5: Basic Tables, Page 152):

Code:
- (void)deselect:(id)sender
{
[tableView deselectRowAtIndexPath:[tableView indexPathForSelectedRow] animated:YES];
}

//Respond to user selection
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)newIndexPath
{
printf("User selected row %d\n", [newIndexPath row] + 1);
[self performSelector:@selector(deselect:) withObject:nil afterDelay:0.5f];
}
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.