Add 2 UIButtons to a UINavigationBar right item
来源:互联网 发布:mac删除windows分区 编辑:程序博客网 时间:2024/06/05 14:38
http://snipplr.com/view/35730/
// create a toolbar to have two buttons in the rightUIToolbar* tools = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 90.0, 44.01)]; // create the array to hold the buttons, which then gets added to the toolbarNSMutableArray* buttons = [[NSMutableArray alloc] initWithCapacity:2]; // create a standard "add" buttonUIButton *btnAdd = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(add)];[buttons addObject:btnAdd];[btnAdd release]; // create a "edit" buttonUIButton *btn = [[UIBarButtonItem alloc] initWithTitle:@"Edit" style:UIBarButtonItemStyleBordered target:self action:@selector(edit)];[buttons addObject:btnEdit];[btnEdit release]; // stick the buttons in the toolbar[tools setItems:buttons animated:NO];[buttons release]; // and put the toolbar in the nav barself.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:tools];[tools release];
- Add 2 UIButtons to a UINavigationBar right item
- How to Add a Icon to your Oracle Apps Toolbar item
- Add Custom Background Image to UINavigationBar in iOS 5
- Add a static route item in OSX
- How to add application to right click menu in Windows
- Add a Toolbox to Matlab
- UINavigationBar left right button 初始化
- How to add new item to the Context Menu
- cocos2之How to add a sprite (2)
- How to add a button to PreferenceScreen
- Add a Sensor to a Robot
- experiment : add menu item to IDA on idapython
- How to add a user to a group
- How To Add a TwoFields Validator
- How to add a .dll file ?
- Add a column to table(Handling)
- Add a system call to linux source
- Add a disk to ASM diskgroup.
- 技术转载:Jni学习三:jni使用java对象详解
- VC-终止线程详解
- Dijkstra+Heap+前向星存图
- ARM架构与X86架构 (转自)魅族论坛
- 技术普及帖:你刚才在淘宝上买了一件东西
- Add 2 UIButtons to a UINavigationBar right item
- jasper (二)
- Struts2学习笔记(三)之输入校验(使用直接编码方式)
- 关于xp_cmdshell
- 实例讲解4--awk命令b
- 设置DIV内内容自适应屏幕
- .Net下的加密解密大全(6):玩转非对称加密
- 基础算法(二)
- 推荐一款基于Java的音视频处理开源项目--JAVE