iPhone development: How to create colored or translucent background for UIActionSheet?

后端 未结 6 2257
盖世英雄少女心
盖世英雄少女心 2020-11-28 05:58

When you try deleting a note in iPhone\'s Notes application, an UIActionSheet pops up. The sheet is translucent (but not black translucent). How is that achieved? Is it p

6条回答
  •  心在旅途
    2020-11-28 06:29

    It looks black to me (note: using 2.2.1). The only reason there's a color to it is because of the yellow behind it.

    One option would be to use the black transparent background and find out the size and speed of the action sheet. Then create a view and animate it in at the same time you show the action sheet, just underneath it, to give it a tint different than the color naturally behind the action sheet. You would have to make the color view also translucent so you could see behind that as well.

    I'm not sure if you can, but you might also try adjusting the opacity of the action sheet itself as well.

提交回复
热议问题