ScottAlertController
Может отображаться на контроллере и в окне, поддерживает пользовательский вид, пользовательскую анимацию, использует AutoLayout, поддерживает iPhone, iPad.
Если ScottAlertController может вам помочь, надеюсь, вы поставите мне звезду.
ScreenShot
Требования
Как использовать
Показать в контроллере:
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];
Показать в окне:
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];
Контакты
[ScottShowAlertView showAlertViewWithView:alertView backgroundDismissEnable:YES];
**Фоновый размытый метод**
```objc
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];
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Комментарии ( 0 )