views:

208

answers:

2

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!

A: 

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

christo16
thanks, I search the docs and figured that was the case - kinda weird to leave that out if you ask me but
Slee
if it's something you want in the SDK, file a radar :)
christo16
A: 

Although, this seems like a small scenario, there is a open source library called Three20 which is created by the developer of the Facebook app. It has something called TTButton in there (very similar to UIButton) and one of the styles offered is the back button with arrow. Its a pretty big library, so I am not sure if it will be worth to put this in just for one thing although they do offer some very nice feature that are not available else where.

Bittu