Amine Arous
Amine Arous

Reputation: 635

Can I customise the UIAlertView [iPhone iOs 4]?

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

Upvotes: 1

Views: 2456

Answers (3)

TomSwift
TomSwift

Reputation: 39512

I have a UIAlertView replacement, shared on on github, that supports using a custom background:

https://github.com/TomSwift/TSAlertView

Upvotes: 1

James J
James J

Reputation: 6458

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.

Upvotes: 3

Lily Ballard
Lily Ballard

Reputation: 185671

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.

Upvotes: 2

Related Questions