UIBarButtonItem. How to show the toggled status if button will be pressed?
I am searching for a solut开发者_运维百科ion how could I show that the UIBarButtonItem is pressed. So I can show the user if some button is pressed?
So I want to show if the user pressed locate me button or not.
Some ideas how I could do that?
Here's how I did it!
- (IBAction) displayPoiMarkers {
if (displayPoiStatus) { // remove the markers
// Button style change.. looks not pressed
displayPoiButton.style = UIBarButtonItemStyleBordered;
} else { // display the markers
// Button style change.. looks pressed
displayPoiButton.style = UIBarButtonItemStyleDone;
}
}
精彩评论