To customize a UIAlertView
, this being a UIView
any, you could simply create a subclass of this and make the changes you want, even overriding the layoutSubviews:
, as shown in that tutorial.
And why could? Because the chances of you getting to publish an app like this is almost zero. See that in the reference of this class there is a note about it, this class is private and should not be modified:
The UIAlertView
class is intended to be used as-is and does not
support subclassing. The view Hierarchy for this class is private and
must not be modified.
But like I said, UIViewAlert
is a UIView
any, then you can make your own alert, it means from scratch, mount your view with the necessary buttons, background, overlay and delegates.
For this, the answer would be very wide involving several details, so I recommend you at least start from this idea and in the course of its development go removing the doubts.
I hope it helped.
It is also worth remembering that the
UIAlertView
is obsolete in the iOS 8, replaced byUIAlertController
.– Paulo Rodrigues