iphone – 如何进入当前视图的UIToolbar
发布时间:2020-12-14 17:37:04 所属栏目:百科 来源:网络整理
导读:我有一个基于导航控制器的应用程序,并在viewDidLoad中添加了一些带代码的工具栏项: NSArray* toolbarItems = [NSArray arrayWithObjects: [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(ad
我有一个基于导航控制器的应用程序,并在viewDidLoad中添加了一些带代码的工具栏项:
NSArray* toolbarItems = [NSArray arrayWithObjects: [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(addButton)],[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:self action:nil],[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCompose target:self action:@selector(composeMail)],nil]; [toolbarItems makeObjectsPerformSelector:@selector(release)]; self.toolbarItems = toolbarItems; 现在我想用[UIActionSheet showFromToolbar:]显示一个actionSheet,我想要一个UIToolbar *,我怎样才能得到我之前创建的UIToolbar? 解决方法
我假设你的意思是“当前视图控制器”.在这种情况下,您需要self.navigationController.toolbar.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- Swift开发教程--如何去掉UITableViewController黑色线条
- postgresql – 是否有一个“pg_restore –quiet”选项,如“
- ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服
- 9i 的flashback
- Ajax 入门之 GET 与 POST 的不同 (2)
- xcode – 如何在Swift中使用Alamofire上传使用参数的图像
- 在swift包generate-xcodeproj之后维护Xcode Run Script Pha
- cocos code IDE在mac下打包apk出错Can't find "tar
- VB.net版机房收费系统——结账功能实现(代码部分)
- 【Flutter 混合开发】添加 Flutter 到 Android Fragment