Custom return button and return button
This method can customize the return button without affecting the return gesture.
UIBarButtonItem * backButton = [[UIBarButtonItem alloc] initWithTitle: @ "" style: Custom target: self action: nil]; self. navigationController. navigationBar. topItem. backBarButtonItem = backButton;
Android custom return key button
The basic principle is as follows, but note that if the activity of the returned target has been completed, you must jump to the returned activity.
Questions about customizing UIBarButtonItem with the iPhone return button
Code: UIImage * backButtonImage = [UIImage imageNamed: @ "backbutton.png"]; UIBarButtonItem * customItem = [[UIBarButtonItem alloc] initWithImage: backButtonImage style: Custom target: self. navigationController action: @ selector (popViewControllerAnimated :)]; [self. navigationController setHidesBackButton: YES]; [self. navigationItem setLeftBarButtonItem: customItem]; [customItem release];