6
votes

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!

2

2 Answers

3
votes

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

0
votes

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.