IOS重写导航栏左侧返回按钮实例
作者:朱克锋
邮箱:zhukefeng@iboxpay.com
转载请注明出处:http://blog.csdn.net/linux_zkf
关键代码
{
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];
}
- (void) test
{
NSLog(@"test");
}
AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。
更多推荐


所有评论(0)