代码拉取完成,页面将自动刷新
can display on controller and window,support custom view, custom animation, use AutoLayout,support iPhone,iPad. if ScottAlertController can help you, i hope you give a star
show in controller
ScottAlertView *alertView = [ScottAlertView alertViewWithTitle:@"ScottAlertView" message:@"这是一段描述文字这是一段描述文字这是一段描述文字这是一段描述文字这是一段描述文字这是一段描述文字."];
[alertView addAction:[ScottAlertAction actionWithTitle:@"取消" style:ScottAlertActionStyleCancel handler:^(ScottAlertAction *action) {
}]];
[alertView addAction:[ScottAlertAction actionWithTitle:@"确定" style:ScottAlertActionStyleDestructive handler:^(ScottAlertAction *action) {
}]];
ScottAlertViewController *alertController = [ScottAlertViewController alertControllerWithAlertView:alertView preferredStyle:ScottAlertControllerStyleAlert transitionAnimationStyle:ScottAlertTransitionStyleDropDown];
alertController.tapBackgroundDismissEnable = YES;
[self presentViewController:alertController animated:YES completion:nil];
show in window
ScottAlertView *alertView = [ScottAlertView alertViewWithTitle:@"提示" message:@"这是一个显示在窗口的alertView"];
ScottAlertAction *action = [ScottAlertAction actionWithTitle:@"好的" style:ScottAlertActionStyleDestructive handler:nil];
[alertView addAction:action];
[ScottShowAlertView showAlertViewWithView:alertView backgroundDismissEnable:YES];
show with blur effect
UIImage *img = [UIImage scott_screenShot];
img = [UIImage scott_blurImage:img blur:0.4];
ScottAlertView *alertView = [ScottAlertView alertViewWithTitle:@"ScottAlertView" message:@"这是一段描述文字这是一段描述文字这是一段描述文字这是一段描述文字这是一段描述文字这是一段描述文字."];
[alertView addAction:[ScottAlertAction actionWithTitle:@"取消" style:ScottAlertActionStyleCancel handler:^(ScottAlertAction *action) {
}]];
[alertView addAction:[ScottAlertAction actionWithTitle:@"确定" style:ScottAlertActionStyleDestructive handler:^(ScottAlertAction *action) {
}]];
ScottAlertViewController *alertController = [ScottAlertViewController alertControllerWithAlertView:alertView preferredStyle:ScottAlertControllerStyleAlert transitionAnimationStyle:ScottAlertTransitionStyleFade];
UIImageView *imgView = [[UIImageView alloc] initWithImage:img];
imgView.userInteractionEnabled = YES;
alertController.backgroundView = imgView;
alertController.tapBackgroundDismissEnable = YES;
[self presentViewController:alertController animated:YES completion:nil];
ScottAlertController 既能显示在控制器上又能显示在window上,支持自定义弹出的view,弹出动画,采用AutoLayout自动布局,支持iPhone,iPad.
如果ScottAlertController能够帮助到你,希望你能够给我star.
展示在Controller上
ScottAlertView *alertView = [ScottAlertView alertViewWithTitle:@"ScottAlertView" message:@"这是一段描述文字这是一段描述文字这是一段描述文字这是一段描述文字这是一段描述文字这是一段描述文字."];
[alertView addAction:[ScottAlertAction actionWithTitle:@"取消" style:ScottAlertActionStyleCancel handler:^(ScottAlertAction *action) {
}]];
[alertView addAction:[ScottAlertAction actionWithTitle:@"确定" style:ScottAlertActionStyleDestructive handler:^(ScottAlertAction *action) {
}]];
ScottAlertViewController *alertController = [ScottAlertViewController alertControllerWithAlertView:alertView preferredStyle:ScottAlertControllerStyleAlert transitionAnimationStyle:ScottAlertTransitionStyleDropDown];
alertController.tapBackgroundDismissEnable = YES;
[self presentViewController:alertController animated:YES completion:nil];
展示在Window上
ScottAlertView *alertView = [ScottAlertView alertViewWithTitle:@"提示" message:@"这是一个显示在窗口的alertView"];
ScottAlertAction *action = [ScottAlertAction actionWithTitle:@"好的" style:ScottAlertActionStyleDestructive handler:nil];
[alertView addAction:action];
[ScottShowAlertView showAlertViewWithView:alertView backgroundDismissEnable:YES];
背景模糊方式
UIImage *img = [UIImage scott_screenShot];
img = [UIImage scott_blurImage:img blur:0.4];
ScottAlertView *alertView = [ScottAlertView alertViewWithTitle:@"ScottAlertView" message:@"这是一段描述文字这是一段描述文字这是一段描述文字这是一段描述文字这是一段描述文字这是一段描述文字."];
[alertView addAction:[ScottAlertAction actionWithTitle:@"取消" style:ScottAlertActionStyleCancel handler:^(ScottAlertAction *action) {
}]];
[alertView addAction:[ScottAlertAction actionWithTitle:@"确定" style:ScottAlertActionStyleDestructive handler:^(ScottAlertAction *action) {
}]];
ScottAlertViewController *alertController = [ScottAlertViewController alertControllerWithAlertView:alertView preferredStyle:ScottAlertControllerStyleAlert transitionAnimationStyle:ScottAlertTransitionStyleFade];
UIImageView *imgView = [[UIImageView alloc] initWithImage:img];
imgView.userInteractionEnabled = YES;
alertController.backgroundView = imgView;
alertController.tapBackgroundDismissEnable = YES;
[self presentViewController:alertController animated:YES completion:nil];
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
1. 开源生态
2. 协作、人、软件
3. 评估模型