JKAlertView 是一个简单美观的警报视图,您可以使用它来显示远程通知或任何您想要的内容。
JKAlertView 需要 iOS 7+,并支持 iPhone 4 及以上版本。
您只需创建一个 JKAlertView 实例并设置所需的值。
JKAlertView *alertView = [[JKAlertView alloc] initWithFontName:@"verdana"];
alertView.headerImage = [UIImage imageNamed:@"bg_img.jpg"];
alertView.titleText = @"The Git";
alertView.detailText = @"Is a version control system that is used for software development and other version control tasks.";
alertView.linkText = @"git-scm";
alertView.url = @"https://git-scm.cn/";
alertView.footerText = @"Wikipedia";
[alertView show];
headerImage
(必需) 警报顶部的标题图片,最小尺寸为 270x155。只要保持 54:31 的宽高比,您可以使用任何大图片。titleText
(必需) 警报标题的文本,最多 32 个字符。detailText
(必需) 警报正文或内容文本,最多 200 个字符。titleTextColor
(可选) 标题的文本颜色。detailTextColor
(可选) 详细信息的文本颜色。linkText
(可选) 链接的文本。linkTextColor
(可选) 链接的文本颜色。url
(可选) 链接的字符串 URL。footerText
(可选) 页脚的文本。