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:-


. . .
Discuss on Helpdesk

Leave a Comment

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

Be the first to comment.

Start a Project

    Message Sent!

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

    Back to Home