tôi đang cố gắng đoạn mã sau:Làm cách nào để đặt chính xác tiêu đề navigationController của UIViewController?
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
Thing *sub = [[subscriptions objectAtIndex:indexPath.row] retain];
StoriesViewController *thing = [[StoriesViewController alloc] initWithThing:sub];
thing.navigationController.title = sub.title;
[self.navigationController pushViewController:thing animated:YES];
[thing release];
[sub release];
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
Tôi nghĩ đây là cách bạn thiết lập một cách chính xác các tiêu đề cho đẩy bộ điều khiển. Tôi đã thử thing.title tuy nhiên đó là thiết lập tiêu đề của TabBarItem thay thế.
triệt để gửi thảo luận ở đây: http://stackoverflow.com/questions/2280710/iphone-setting-navigation-bar-title –