Latest 1.1.5
Homepage https://github.com/HJaycee/JCPresentQueue
License MIT
Platforms ios 7.0, requires ARC
Authors

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

for (int i = 0; i<3; i++) {
    UIAlertController *alert = ({
        NSString *title = [NSString stringWithFormat:@"alert%i", i + 1];
        UIAlertController *alert = [UIAlertController alertControllerWithTitle:title message:nil preferredStyle:UIAlertControllerStyleAlert];
        UIAlertAction *alertAction = [UIAlertAction actionWithTitle:@"ok" style:UIAlertActionStyleDefault handler:nil];
        [alert addAction:alertAction];
        alert;
    });
    [JCPresentController presentViewControllerLIFO:alert presentCompletion:nil dismissCompletion:nil];
}
}

Latest podspec

{
    "name": "JCPresentQueue",
    "version": "1.1.5",
    "summary": "automatic manages the queue of presented controllers",
    "homepage": "https://github.com/HJaycee/JCPresentQueue",
    "license": "MIT",
    "authors": {
        "HJaycee": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/HJaycee/JCPresentQueue.git",
        "tag": "1.1.5"
    },
    "source_files": "JCPresentQueueDemo/JCPresentQueueDemo/JCPresentQueue/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This