Check Mobile App
Read now

Creating Custom UIAlertController using UIWindow in Ios

Save

UIAlertController

 

 

When we use UIAlertController   then we require view controller to present, if it is not there it will not work or if  launched without getting present view then it is not possible to remove from view controller  so on that time UIWindow is used to  create the custom alert controller . it will run on the top root of the window .

 

hwm5u

 

To Launch :—

Ex :  UIWindow *currentWindow = [UIApplication sharedApplication].keyWindow;

[className  alertController:currentWindow];

To Remove :—

if([currentWindow viewWithTag:121212])
[[currentWindow viewWithTag:121212] removeFromSuperview];

 

 

 

 

. . .

Leave a Comment

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


Be the first to comment.

css.php

I sincerely thank everyone on the team for putting in your efforts so I can work 100% in my country without worrying that some local company will overcharge me and do the job wrong so I would definitely recommend anyone once again to work with the Webkul team. If I had to do this again I would definitely hire you without a second thought! thanks and wish you the best hope we keep working for a long time!

Martin Blumenfeld

Martin Blumenfeld

Talk to Sales

Global

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