JCPresentQueue 1.1.5

JCPresentQueue 1.1.5

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
发布最新发布2019年1月

HJaycee 维护。



  • HJaycee

JCPresentQueue

您可以使用如下方式显示多个类似这样的警告

CocoaPods 安装

步骤 1

target 'your target' do
pod 'JCPresentQueue'
end

步骤 2

#import "JCPresentController.h"

用法

// 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];
}
}