Latest | 0.1.1 |
---|---|
Homepage | https://github.com/ablettchen/ATAlertView |
License | MIT |
Platforms | ios 8.0, requires ARC |
Dependencies | YYText, ATPopupView |
Frameworks | UIKit, Foundation |
Authors |
ATAlertView
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
#import <ATAlertView/ATAlertView.h>
- Alert – Default
NSString *detail = @"neach button take one row if there are more than 2 items";
NSArray *actions = @[ATPopupActionMake(@"Done", ATPopupActionStyleNormal, block),
ATPopupActionMake(@"Save", ATPopupActionStyleHighlighted, block),
ATPopupActionMake(@"Cancel", ATPopupActionStyleNormal, block)];
ATAlertView.build.withTitle(title).withDetail(detail).withActions(actions).showInWindow();
- Alert – Confirm
ATAlertView.build.withTitle(title).withDetail(@"Confirm Dialog").showInWindow();
- Alert – Confirm / Without title
NSString *detail = @"您的班级信息数据已更新完成,请重新刷新列表查看最新数据.";
NSArray *actions = @[ATPopupActionMake(@"知道了", ATPopupActionStyleHighlighted, block)];
ATPopupCompletionBlock didHideBlock = ^ (__kindof ATPopupView * _Nonnull popupView, BOOL finished) {
if (finished) {NSLog(@"didDisApper");}
};
ATAlertView.build.withDetail(detail).withActions(actions).withDidHide(didHideBlock).showInWindow();
- Alert – Link
NSString *detail = @"尊敬的用户,为给您提供更好的服务,本应用会使用到一些您的个人信息。不过请放心,我们非常重视您的个人信息和隐私保护,您的信息将仅用于为您提供服务或改善服务体验。请您在使用本应用之前仔细阅读《用户隐私政策》,如同意此政策,请点击“同意”并开始使用我们的产品和服务。";
NSURL *url = [NSURL URLWithString:@"https://github.com/ablettchen/ATPopupView"];
NSArray *links = @[ATPopupLinkMake(@"《用户隐私政策》", url, ^(ATPopupLink * _Nonnull link) {
NSLog(@"%@", link.url);
})];
NSArray *actions = @[ATPopupActionMake(@"退出", ATPopupActionStyleNormal, block),
ATPopupActionMake(@"同意", ATPopupActionStyleHighlighted, block)];
ATAlertView.build.withTitle(@"温馨提示").withDetail(detail).withActions(actions).withLinks(links).showInWindow();
- Alert – Input
ATPopupInputCompletionBlock didEndInputBlock = ^ (NSString *_Nonnull text) {
NSLog(@"didEndInput, text:%@", text);
};
ATAlertView.build.withTitle(title).withDetail(@"Input Dialog").
withInputPlaceholder(@"Your placeholder").withDidEndInput(didEndInputBlock).showInWindow();
Requirements
Installation
ATAlertView is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod 'ATAlertView-OC'
Author
ablett, [email protected]
License
ATAlertView is available under the MIT license. See the LICENSE file for more info.
Latest podspec
{ "name": "ATAlertView-OC", "version": "0.1.1", "summary": "Alert view", "homepage": "https://github.com/ablettchen/ATAlertView", "license": { "type": "MIT", "file": "LICENSE" }, "authors": { "ablett": "[email protected]" }, "source": { "git": "https://github.com/ablettchen/ATAlertView.git", "tag": "0.1.1" }, "social_media_url": "https://twitter.com/ablettchen", "platforms": { "ios": "8.0" }, "source_files": "ATAlertView/**/*.{h,m}", "requires_arc": true, "frameworks": [ "UIKit", "Foundation" ], "dependencies": { "YYText": [], "ATPopupView": [] } }
Mon, 27 May 2019 10:06:12 +0000