Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
805 views
in Technique[技术] by (71.8m points)

iphone - 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!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...