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 08-16-2010, 11:34 AM   #1 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 5
parmeet is on a distinguished road
Default Back button !

Hi,

This is my first post here and i'm hoping for a quick reply. Is it possible to add a back button like the one on a uinavigationbar to a uiview? How??

Appreciate the help.

Thanks,
Parmeet
parmeet is offline   Reply With Quote
Old 08-16-2010, 12:34 PM   #2 (permalink)
Registered Member
 
msencenb's Avatar
 
Join Date: May 2009
Location: Stanford, CA
Posts: 291
msencenb is on a distinguished road
Default

You could manually do this... but why not just use a navigation controller? If you are "drilling" down into something generally the navigation controller is the way to go.
__________________
I'm starting a new blog dedicated to iOS development. Check it out at:

http://www.iosdevscreencasts.com
msencenb is offline   Reply With Quote
Old 08-16-2010, 11:52 PM   #3 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 5
parmeet is on a distinguished road
Default

How would i do it manually ? Can you give me a code snippet ? I cannot use the navigationbar as i need to do some customization which it does not allow.

Thanks,
Parmeet
parmeet is offline   Reply With Quote
Old 08-17-2010, 12:43 AM   #4 (permalink)
Registered Member
 
Join Date: May 2010
Posts: 577
Speed is on a distinguished road
Default

Try this in an IBAction or call this code when the button is pressed:

Code:
[self.navigationController popViewControllerAnimated:YES];
To go right back to the main view controller, try this:

Code:
[self.navigationController popRootViewControllerAnimated:YES];
Speed is offline   Reply With Quote
Old 08-17-2010, 12:49 AM   #5 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 5
parmeet is on a distinguished road
Default

I apologize if i didn't make myself clear. I'm not using the navigationcontroller. What i need is a button on a uiview which looks like the backbarbutton on the usual navigation bar.
parmeet is offline   Reply With Quote
Old 08-17-2010, 01:34 AM   #6 (permalink)
Registered Member
 
Join Date: May 2010
Posts: 577
Speed is on a distinguished road
Default

So you want the image of the back button? You may have to make this one yourself or just take a screenshot an copy that.
Speed is offline   Reply With Quote
Reply

Bookmarks

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: 357
4 members and 353 guests
givensur, linkmx, Newbie123, PlutoPrime
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,657
Threads: 94,118
Posts: 402,894
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jenniead38
Powered by vBadvanced CMPS v3.1.0

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