开发者

How to put images in action sheet button?

I have created an action sheet which contains more than one button, and I want 开发者_如何学JAVAto put different images on different buttons, how can I do that?


You can't, the "buttons" (actually a special class called a three part button, IIRC) in UIActionSheet are not directly accessible and you can't subclass it either. However it is pretty easy to write your own, see http://blog.corywiles.com/custom-uiactionsheet-using-core-animation for an example or inspiration. It's only a view with some buttons as subviews, and a bit of code to handle sliding it up from the bottom of the screen.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜