Custom UIBarButtonItems from UIButtons with custom images - is it possible to make the tap targets larger?
问题 I'm making UIBarButtons as follows: // Create "back" UIBarButtonItem UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom]; backButton.frame = CGRectMake(0, 0, 28, 17); [backButton addTarget:self action:@selector(backButtonTapped) forControlEvents:UIControlEventTouchUpInside]; backButton.showsTouchWhenHighlighted = YES; UIImage *backButtonImage = [UIImage imageNamed:@"back-button.png"]; [backButton setBackgroundImage:backButtonImage forState:UIControlStateNormal];