UIBarButtonItem *updateButton = [[UIBarButtonItem alloc] initWithTitle:@"修改" style:UIBarButtonItemStylePlain target:self action:@selector(updateInfo)];
self.navigationItem.rightBarButtonItem = updateButton;
navigationbar 左侧按钮
{
self.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:@"首页"style:UIBarButtonItemStyleBordered target:self action:@selector(popToRootView)]
autorelease];
self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:@"测试"style:UIBarButtonItemStyleBordered target:self action:@selector(test)]
autorelease];
}
- (void)popToRootView
{
[self.navigationController popToRootViewControllerAnimated:YES];
}