UIButton* backButton = [UIButton buttonWithType:101]; // left-pointing shape!
[backButton setTitle:@"更多" forState:UIControlStateNormal];
[backButton addTarget:self action:@selector(btBackPressed:) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem* tempBar=[[UIBarButtonItem alloc]initWithCustomView:backButton];
self.navigationItem.leftBarButtonItem=tempBar;
本文介绍如何在iOS应用中使用UIButton创建自定义的返回按钮,并将其添加到UINavigationItem中实现返回功能。

被折叠的 条评论
为什么被折叠?



