Changing the background color of a UIAlertView?

前端 未结 12 1110
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-28 03:12

I want to change the background color of my UIAlertView, but this doesn\'t appear to have a color attribute.

12条回答
  •  难免孤独
    2020-11-28 03:55

    I don't believe that there is an exposed method or property for doing this. Setting the backgroundColor of the UIAlertView (as a UIView) merely puts a colored rectangular backdrop behind the alert view.

    I'd say that it would probably go against the common interface of the iPhone to alter this color, so I don't think it's recommended behavior (in the same way that changing the background color of an alert view in Mac OS X is not recommended).

提交回复
热议问题