CustomIOSAlertView

//做版本更新提示器
//提示框
- (void)showAlertViewWithString:(NSString *)string {

      CustomIOSAlertView *alertView = [[CustomIOSAlertView alloc] initWithParentView:SharedApplication.keyWindow];
      [alertView setContainerView:[self createMessageView:string]];
      [alertView setButtonTitles:[NSMutableArray arrayWithObjects:@"立即更新", @"以后再说", nil]];
      [alertView setDelegate:self];
      [alertView setOnButtonTouchUpInside:^(CustomIOSAlertView *alertView, int buttonIndex) {
      [alertView close];
      }];
      [alertView setUseMotionEffects:true];
      [alertView show];
}

//协议方法
#pragma mark --CustomIOSAlertViewDelegate
- (void)customIOS7dialogButtonTouchUpInside: (CustomIOSAlertView *)alertView clickedButtonAtIndex: (NSInteger)buttonIndex
{
if (buttonIndex == 0) {
NSString *url = @"https://itunes.apple.com/cn/app/shan-xi-gua-hao/id992049985?mt=8";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];
}
[alertView close];
}

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容