UIBarButtonItem : selected / unselected an item
问题 I have a favorite image to display on a UIBarButtonItem , on an toolbar. How do you do to change it when this item is unselected/selected? like this screenshot: Thanks! 回答1: You can make two arrays with UIBarButtonItems: one with the first image and one with the second image. Like this: // array with unselected UIBarButtonItem *unselectedItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"icon_unselected.png"] style:UIBarButtonItemStyleBordered target:self action:@selector