Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

creating back arrow shaped leftBarButtonItem on UINavigationController

I have a view with a navigation controller that I am showing modally and I want to add a back button that is shaped like the default left arrow buttons used in most splitViewControllers.

I can create a basic button but I really want the left arrow shape - here is what i have now:

/* set title and nav bar items */
self.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:@"Back To Thumbnails" style:UIBarButtonItemStylePlain target:self action:@selector(backToThumbnails:)] autorelease];

I only saw 3 options for style here? Any suggestions are greatly appreciated!

like image 739
Slee Avatar asked Jul 22 '10 15:07

Slee


1 Answers

Unfortunately creating a button like that is not apart of the public API, you'll need to make a custom UIBarButton with an image.

like image 83
christo16 Avatar answered Oct 07 '22 18:10

christo16