zoukankan      html  css  js  c++  java
  • AFNetWorking 判断当前版本是否是最新版本

      NSString *url = [[NSString alloc] initWithFormat:@"http://itunes.apple.com/lookup?id=%@",@"***"];

        [self reqeautDataUrl:url parma:nil block:^(NSDictionary *dataDic, NSError *error) {

            [self hideHud];

            if(error){

                [self showAlertView:@"版本获取失败"];

                return ;

            }

             NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];

            NSString *app_Version = [infoDictionary objectForKey:@"CFBundleShortVersionString"];

            if([[dataDic objectForKey:@"version"] isEqualToString:app_Version]){

                UIActionSheet *actionSheet = [[UIActionSheet alloc]initWithTitle:@"提示" delegate:nil cancelButtonTitle:@"确定" destructiveButtonTitle:@"已经是最新版本" otherButtonTitles:nil, nil];

                [actionSheet showInView:self.view];

            }else {

                UIActionSheet *actionSheet = [[UIActionSheet alloc]initWithTitle:@"提示" delegate:nil cancelButtonTitle:@"确定" destructiveButtonTitle:@"请更新最新的版本" otherButtonTitles:nil, nil];

                [actionSheet showInView:self.view];

            }

        }];

  • 相关阅读:
    jstl <c:url>标签
    4.12快速分类
    2.递归回溯求子集和数问题
    计算圆面积
    openal在vs2010中的配置
    结构体数组排序
    检测信号的有无
    matlab中mat文件简单存/取
    m文件转换c代码
    安装fftw到window(vs2010)及使用fftw库函数实现4096点fft变换计算
  • 原文地址:https://www.cnblogs.com/hualuoshuijia/p/5408001.html
Copyright © 2011-2022 走看看