I needed to create a custom one UIAlertViewfor my application, and I came across this article describing how to do this. Iโve made a few changes since then, but itโs all the more important that this class does not work as a โFire and Forgetโ warning, as it does UIAlertView, because ARC does not allow naming retain.
So basically, I want to be able to use my custom alert view in the same way as the normal alert view, so I can create and display it like this:
CustomAlertView *alert = [[CustomAlertView alloc] init];
[alert show];
So my question is: how can I make this object not freed up as soon as it leaves the scope when working in an ARC project without creating a link strongto it in the calling class?
EDIT
I believe it is important to note that in order to get the full freedom of customization that I wanted, I had to make it a new ViewController class, it is NOT a subclassUIAlertView
EDIT 2
Sorry, I didnโt look at my link too closely, initially I had the wrong textbook. THIS is the right study guide. I based my opinion on
source
share