支持iOS 7 的AlertController
To run the example project, clone the repo, and run pod install
from the Example directory first.
easy to use
PWAlertController *alert = [PWAlertController sheetWithTitle:nil cancelButtonTitle:@"取消" destructiveButtonTitle:@"删除" buttonClicked:^(NSUInteger index) {
NSLog(@"alert selected at index:%ld", index);
} otherButtonTitles:@"标题一",@"标题二",@"标题三",nil];
[self presentViewController:alert animated:YES completion:^{
}];
iOS 7 下,
[self presentViewController:alert animation:YES completion:nil];
前面要写一句self.modalPresentationStyle = UIModalPresentationCurrentContext;
PWAlertController is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod "PWAlertController"
Paul Wang, wangwc@putao.com
PWAlertController is available under the MIT license. See the LICENSE file for more info.