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

A category automatic manages controller present order.

Installation with CocoaPods

step 1

target 'your target' do
pod 'JCPresentQueue'
end

step 2

#import "UIViewController+JCPresentQueue.h"

Usage

// JCPresentTypeLIFO: alert3 >> alert2 >> alert1 (same with UIAlertView)
// JCPresentTypeFIFO: alert1 >> alert2 >> alert3

for (int i = 1; i<4; i++) {
NSString *title = [NSString stringWithFormat:@"alert%zi", i];
UIAlertController *alert = [UIAlertController alertControllerWithTitle:title message:nil preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *alertAction1 = [UIAlertAction actionWithTitle:@"ok" style:UIAlertActionStyleDefault handler:nil];
[alert addAction:alertAction1];
[self jc_presentViewController:alert presentType:JCPresentTypeLIFO presentCompletion:nil dismissCompletion:nil];
}

Latest podspec

{
    "name": "JCPresentQueue",
    "version": "1.0.3",
    "summary": "A category for present controllers with FIFO or LIFO",
    "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.0.3"
    },
    "source_files": "JCPresentQueueDemo/JCPresentQueueDemo/UIViewController+JCPresentQueue.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This