zoukankan      html  css  js  c++  java
  • 爱限免Demo

    1.资源:

      网络接口、数据解析库AFNetWorking.h 、...

    2.建立界面  --搭建框架

      列表AppListViewController --> 列表显示数据,上拉加载下拉刷新(JHRefresh),搜索列表,传值。。。

      建立几个SubViewController : AppListViewController

    // 把汉字转化成url encoded可以在网上传输的...
        NSString *str = [searchBar.text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

      详情界面DetailViewController -->数据重载, 传值(block),分享(友盟分享),收藏,下载。。。

    //下载
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:self.model.itunesUrl]];

      专题界面TopicViewController --> 嵌套显示

    3.导航进入  

      CategoryViewController(分类) --> 传值AppListViewController(重新加载数据)

      ConfigViewController(配置) --> 缓存,数据存储(数据库FMDB)

    4.其他

      分享:友盟分享(UMSocial), ShareSDK, 百度分享-- 找官方文档,照做即可

       添加加载效果 --> 第三方HUD下载提示框  SVProgressHUD  

      网络活动提示

        //打开网络活动提示
        [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES];
    
        //关闭网络活动提示
        [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];

     

     。。。

    去掉performSelector警告
    #pragma clang diagnostic ignored "-Warc-performSelector-leaks"'
    
    //是否支持自动旋转
    -(BOOL)shouldAutorotate
    {
        return YES;
    }
    //支持的旋转方向
    -(NSUInteger)supportedInterfaceOrientations
    {
        return UIInterfaceOrientationMaskAll;
    }
    //是否能否旋转到该方向
    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
    {
        return (toInterfaceOrientation == UIInterfaceOrientationPortrait);
    }
    
    
    
    //即将开始旋转
    - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
    {
        
    }
    //已经结束旋转
    -(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
    {
        _tableView.frame = self.view.bounds;
    }
    
    
    //自动横屏
    -(NSUInteger)supportedInterfaceOrientations
    {
        return UIInterfaceOrientationMaskLandscapeLeft;
        //return UIInterfaceOrientationMaskPortrait;
        
    }
  • 相关阅读:
    [树形dp] Jzoj P5814 树
    [快速幂][数学][dp] Jzoj P5813 计算
    [差分] Jzoj P5812 区间
    [贪心][模拟] Jzoj P5811 简单的填数
    如何用c++发出音乐
    网络流初步详解
    【纪中模拟2019.08.01】【JZOJ2644】数列
    【纪中模拟2019.08.02】【JZOJ1308】取数游戏
    2019.08纪中 XC谈OI学习方法论
    C++STL容器
  • 原文地址:https://www.cnblogs.com/wlrBlogs/p/4418363.html
Copyright © 2011-2022 走看看