开发者

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;
    }

}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜