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 03-21-2009, 03:24 PM   #1 (permalink)
Registered Member
 
Join Date: Mar 2009
Location: California
Posts: 54
rooster117 is on a distinguished road
Default UINavigationBar back button help

Hello,

I'm trying to make a simple one level in navigation bar. I'm just simply listing some buttons and I want to be able to click them go to a new view and have the user click the back button on the navigation bar to return to the main list.

I have the navigation bar set up and the list of buttons etc. and when the user clicks on a view I push the new navigation item onto the bar and the back button appears.

My only problem is handling the pressing of the back button. I am trying to use the function:
-(void) navigationBar: (UINavigationBar *)bar buttonClicked: (int) button

but I can't get this function to be hit. Is this the wrong function for the job? Is there a function to override which is specific to the back button?

Please let me know if you need any more clarification.

Thank you in advance for any help you can provide.

-Ryan
rooster117 is offline   Reply With Quote
Old 03-22-2009, 07:25 AM   #2 (permalink)
Registered Member
 
Join Date: Jan 2009
Posts: 25
blacksheep_2011 is on a distinguished road
Default

Hi,

have you set the delegate of the navigationBar to the file which includes the button click methode?

If you havn't done it, please do it.


Cya,

Blacksheep
blacksheep_2011 is offline   Reply With Quote
Old 03-22-2009, 10:38 AM   #3 (permalink)
Registered Member
 
Join Date: Mar 2009
Location: California
Posts: 54
rooster117 is on a distinguished road
Default Thanks

Hi,

Thanks for the reply. I'm currently doing this:
[navBar setDelegate: self]; in the same file that has the buttonClicked function.
I also tried adding to the .h of that file <UINavigationBarDelegate>.

Is there anything else I need to do to make the delegate set correctly? I'm pretty bad at this stuff.

Thanks for your help.

-Ryan
rooster117 is offline   Reply With Quote
Reply

Bookmarks

Tags
buttonclicked, uinavigationbar

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: 334
3 members and 331 guests
guusleijsten, Kryckter, LEARN2MAKE
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,649
Threads: 94,113
Posts: 402,880
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Anwerbl
Powered by vBadvanced CMPS v3.1.0

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