问题
I try to run this a sample that customise UIAlertView but it doesn't work.
http://joris.kluivers.nl/iphone-dev/?p=CustomAlert
I would like to change the background image of the UIAlertView.
Can I do it?
Thanks
回答1:
I have customized UIAlertView before, which broke when a new OS was released (4.2, specifically). I recommend implementing your own custom view instead of trying to customizing UIAlertView.
回答2:
Technically yes, you can, but it's frowned upon. Modifying the private view hierarchy of a framework-provided control is dangerous and can cause incompatibility with future versions of the OS. What's more, you're breaking UI conventions if you start changing these things, and that should not be done lightly.
回答3:
I have a UIAlertView replacement, shared on on github, that supports using a custom background:
https://github.com/TomSwift/TSAlertView
来源:https://stackoverflow.com/questions/4798271/can-i-customise-the-uialertview-iphone-ios-4