SAMAlertView 1.0.0

SAMAlertView 1.0.0

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
释放最后发布2015年7月

Milan Panchal 维护。




SAMCustomAlertView

在 UIVIew/UIWindow 上显示自定义 AlertView

安装

从源代码

很简单。只需在桌面下载或克隆。将源代码文件夹和资源文件夹拖放到您的项目中。之后,在任何您希望添加的位置添加以下语句。

#import <SAMAlertView.h>    /*If you added via cocoapods*/
#import "SAMAlertView.h"    /*If you added manually*/

如何使用?

SAMAlertView *alertView = [SAMAlertView alertWithTitle:@"Your Custom Alert Title" message:@"Your custom message will appear here!"];
[alertView setButtonTitles:@[@"CANCEL",@"ADD"]];
[alertView setButtonColors:@[COLOR_RGBA(232, 234, 234, 1), COLOR_RGBA(65, 150, 241, 1)]];
[alertView setButtonTitleColors:@[COLOR_RGBA(145, 145, 145, 1), COLOR_RGBA(255, 255, 255, 1)]];
[alertView setButtonImages:@[IMAGE_CROSS_ICON,IMAGE_ADD_ICON]];
[alertView setCustomButtonAlignment:CustomButtonAlignmentHorizontal];
//[alertView setCustomButtonAlignment:CustomButtonAlignmentVertical];

[alertView setOnButtonTouchUpInside:^(SAMAlertView *alertView, int buttonIndex) {
    NSLog(@"Block: Button at position %d is clicked on alertView %ld.", buttonIndex, (long)[alertView tag]);

}];
[alertView show];

截图

水平按钮

image

垂直按钮

image

下一步

请随时为该项目做出贡献。计划添加更多方法。

联系

关注我:

  1. Twitter (@milan_panchal24)

  2. Github (/milanpanchal)

  3. 博客 (https://techfuzionwithsam.wordpress.com/)

许可证

SAMCustomAlertView 根据 MIT 许可证提供。有关更多信息,请参阅许可证文件。