Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 10-26-2010, 11:52 AM   #1 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 14
Andy Elliott is on a distinguished road
Default How to add "info" button to the left of an existing right bar button?

Currently I have a nav bar with an "edit" button far left, a "+" button far right with the title in the middle.
How do I place an "info" button just to the left of the "+" button?

I think I have a handle creating the button just not placing it.
To create the button I've got:
UIButton* infoButton = [UIButton buttonWithType:UIButtonTypeInfoLight];
[infoButton addTarget:self action:@selector(infoButtonAction) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *modalButton = [[UIBarButtonItem alloc] initWithCustomView:infoButton];
[self.navigationItem setLeftBarButtonItem:modalButton animated:YES];
[modalButton release];
The above code was found in this forum.
Thanks!
Andy Elliott is offline   Reply With Quote
Old 10-26-2010, 12:57 PM   #2 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 60
ZubiZubi is on a distinguished road
Default

use UISegmentedControl and add the 2 buttons to it, then add the segment control as left button in navigation bar.
__________________
My Apps in AppStore
ZubiZubi is offline   Reply With Quote
Reply

Bookmarks

Tags
infobutton

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 324
14 members and 310 guests
7twenty7, chiataytuday, condor304, Creativ, Domele, dreamdash3, laureix68, LEARN2MAKE, mistergreen2011, mottdog, palme2elie, Paul Slocum, schmallegory
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,660
Threads: 94,118
Posts: 402,895
Top Poster: BrianSlick (7,990)
Welcome to our newest member, laureix68
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:21 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0