Skip to content

Latest commit

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

JCPresentQueue

You can present multiple alerts like this:

Installation with CocoaPods

step 1

target 'your target'do
pod 'JCPresentQueue'
end

step 2

#import"JCPresentController.h"

Usage

// JCPresentTypeLIFO: alert3 >> alert2 >> alert1// JCPresentTypeFIFO: alert1 >> alert2 >> alert3for (int i = 0; i<3; i++) {
UIAlertController *alert = ({
NSString *title = [NSStringstringWithFormat:@"alert%i", i + 1];
UIAlertController *alert = [UIAlertController alertControllerWithTitle:title message:nilpreferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *alertAction = [UIAlertAction actionWithTitle:@"ok"style:UIAlertActionStyleDefault handler:nil];
[alert addAction:alertAction];
alert;
});
[JCPresentController presentViewControllerLIFO:alert presentCompletion:nildismissCompletion:nil];
}
}

About

automatic manages the queue of presented controllers

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages