Create Global UIAlertController in Swift


Global UIAlertController

Here we discuss best practice to show your alerts in iOS Applications using UIAlertController. Almost every page of the application contains some alerts, so it’s weird or hectic to write again and again same lines of code to show the alert actions and when we create the alerts many times, it takes more memory:- like we create the object of the UIAlertController 5 times.It takes the memory five times in heap. so it’s better to create at one place or create an extension of UIAlertController so it takes memory only one time not again and again. you can also create static function of UIAlertController to show the alerts. Example creating UIAlertController global.

How to use:-


. . .

Leave a Comment

Your email address will not be published. Required fields are marked*

Be the first to comment.


The results provided were above our expectations both in deliverability timeline as well as operation. They are a top-notch company with many resources and a company we feel honoured to work with again!

Lee Seward

Lee Seward

Founder, Gro-Connect

Talk to Sales


Live Chat
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home