开发者

Is there a way to handle all actions off of a UIToolbar?

Is there a way to use actions and selectors from Interface Builder to bind handlers to a UIToolbar? Rather than enumerating the UIButtonBarItems and adding action selectors to each one at a time, I was hoping I could just implement a single method in my Controller, that would handle all of the buttons and handle the events by switching on either button's Tag or I开发者_如何学JAVAdentifier.


You are free to connect as many bar buttons as you like to the same IBAction method in Interface Builder. In the method, you can use the sender argument to see which button was tapped.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜