TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Oct 2016 |
Maintained by luckytianyiyan.
Simply
TYAlertView *alertView = [[TYAlertView alloc] initWithTitle:@"title" message:@"message"];
[alertView addAction:[TYAlertAction actionWithTitle:@"Ok"
style:TYAlertActionStyleDefault
handler:^(TYAlertAction * _Nonnull action) {
NSLog(@"Ok button clicked");
}]];
[alertView show];
Custom TYAlertView Theme
[TYAlertView appearance].titleColor = [UIColor redColor];
[TYAlertView appearance].messageColor = [UIColor redColor];
[TYAlertView appearance].separatorColor = [UIColor grayColor];
[TYAlertView appearance].shadowRadius = 4.0f;
[TYAlertView appearance].popupViewBackgroundColor = [UIColor blueColor];
// Button Title Color
[[TYAlertView appearance] setButtonTitleColor:[UIColor yellowColor]
forActionStyle:TYAlertActionStyleDefault
forState:UIControlStateNormal];
To run the example project, clone the repo, and run pod install
from the Example directory first.
TYAlertView is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "TYAlertView"
TYAlertView
is available under the MIT
license. See the LICENSE file for more info.