1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/Scott_Mr-ScottAlertController

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
Внести вклад в разработку кода
Синхронизировать код
Отмена
Подсказка: Поскольку Git не поддерживает пустые директории, создание директории приведёт к созданию пустого файла .keep.
Loading...
README.md

ScottAlertController

Может отображаться на контроллере и в окне, поддерживает пользовательский вид, пользовательскую анимацию, использует AutoLayout, поддерживает iPhone, iPad.

Если ScottAlertController может вам помочь, надеюсь, вы поставите мне звезду.

ScreenShot

ScreenShot

Требования

  • Xcode 5 +
  • iOS 7.0 +
  • ARC

Как использовать

  • Показать в контроллере:

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

Контакты

  • Если вы обнаружили ошибку, откройте вопрос.
  • Если вам нужна помощь, откройте вопрос.
  • Если у вас есть новые требования, также откройте вопрос. ``` ScottAlertView *alertView = [ScottAlertView alertViewWithTitle:@"提示" message:@"这是一个显示在窗口的 alertView"]; ScottAlertAction *action = [ScottAlertAction actionWithTitle:@"好的" style:ScottAlertActionStyleDestructive handler:nil]; [alertView addAction:action];

[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];

Контакты

  • Если вы обнаружили ошибку, пожалуйста, создайте issue.
  • Если вам нужна помощь в расширении, пожалуйста, создайте issue.
  • Если хотите внести вклад в код, свяжитесь с нами.

Комментарии ( 0 )

Вы можете оставить комментарий после Вход в систему

Введение

ScottAlertController может отображаться на контроллере и в окне, поддерживает пользовательский интерфейс, пользовательскую анимацию, использует AutoLayout, поддерживает iPhone, iPad. Развернуть Свернуть
MIT
Отмена

Обновления

Пока нет обновлений

Участники

все

Недавние действия

Загрузить больше
Больше нет результатов для загрузки
1
https://api.gitlife.ru/oschina-mirror/Scott_Mr-ScottAlertController.git
git@api.gitlife.ru:oschina-mirror/Scott_Mr-ScottAlertController.git
oschina-mirror
Scott_Mr-ScottAlertController
Scott_Mr-ScottAlertController
master