开发者

How to put images in action sheet button?

开发者 https://www.devze.com 2023-03-30 06:09 出处:网络
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

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

精彩评论

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