UIAlertView的一個代替:TAlertView

jopen 10年前發布 | 14K 次閱讀 iOS開發 移動開發 TAlertView

TAlertView是UIAlertView的一個代替。

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

TAlertView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "TAlertView"

Example

example.gif

//Alert 6
TAlertView *alert = [[TAlertView alloc] initWithTitle:nil
                                                  message:@"This alert show two buttons horizontally"
                                                  buttons:@[@"No", @"Yes"]
                                              andCallBack:^(TAlertView *alertView, NSInteger buttonIndex) {}];
    alert.buttonsAlign = TAlertViewButtonsAlignHorizontal;
    [alert showAsMessage];

//Alert 1
[[[TAlertView alloc] initWithTitle:@"Great!" andMessage:@"This is a basic alert"] show];

項目主頁:http://www.baiduhome.net/lib/view/home/1416983923690

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!