TOAlertViewController 1.0.0

TOAlertViewController 1.0.0

Maintained by Tim Oliver.



  • By
  • Tim Oliver

TOAlertViewController

TORoundedButton

Build status Version GitHub license Platform PayPal Twitch

TOAlertViewController is a custom re-implementation of UIAlertController with a much more modern visual design. It features a large bold title and rounded action buttons in line with the more modern design language of iOS that started appearing since 2017.

Features

  • A much more modern look and field than the native UIAlertController class (As of iOS 13).
  • Includes theming for default, and destructive action buttons.
  • Provides an optional dark mode appearance.
  • Smooth presentation and dismissal animations.
  • Uses UIVisualEffectView to produce a subtle 'depth-of-field' effect when presented.

Examples

TOAlertViewController features a complete default configuration useful for most app instances, but can be easily modified beyond that.

    TOAlertViewController *alertController = [[TOAlertViewController alloc]
                                              initWithTitle:@"Are you sure?" message:@"This action may take some time to complete. Are you sure you wish to perform this action?"];

    alertController.defaultAction = [TOAlertAction alertActionWithTitle:@"Yes" action:^{ NSLog(@"Default Button Tapped!"); }];
    alertController.cancelAction = [TOAlertAction alertActionWithTitle:@"Cancel" action:^{ NSLog(@"Cancel Button Tapped!"); }];

    [self presentViewController:alertController animated:YES completion:nil];

Requirements

TOAlertViewController will work with iOS 11 and above. While written in Objective-C, it will easily import into Swift. It also requires the TORoundedButton library to be installed in your app.

Manual Installation

Copy the contents of the TOAlertViewController folder to your app project. Download a copy of TORoundedButton and also be sure to install that into your project as well.

CocoaPods

CocoaPods automatically manages importing TORoundedButton itself.

pod 'TOAlertViewController'

Carthage

github "TimOliver/TORoundedButton"
github "TimOliver/TOAlertViewController"

Credits

TOAlertViewController was created by Tim Oliver as a component of iComics.

The iOS device mockup art was also created by Tim Oliver and is available on Dribbble.

License

TOAlertViewController is available under the MIT license. Please see the LICENSE file for more information. analytics