zoukankan      html  css  js  c++  java
  • app刚开始启动时(即:appdelegate文件中)可以写的几个功能

    app刚开始启动时(即:appdelegate文件中)可以写的几个功能:

    1、通过判断根控制器,来实现区分有无欢迎界面

    2、因为ios11的tableview跟之前有的有些区别,所以在app启动时可以加一个适配ios11的方法{

    if (@available (iOS 11.0,*)) {

            UIScrollView.appearance.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;

            UITableView.appearance.estimatedRowHeight = 0;

            UITableView.appearance.estimatedSectionFooterHeight = 0;

            UITableView.appearance.estimatedSectionHeaderHeight = 0;

        }

    }

    3、app有时候会因为内存不够,会触动applicationDidReceiveMemoryWarning:方法,所以,可以做一些清理内存的操作{

    [[SDWebImageManager sharedManager]cancelAll]; //取消所有下载

        [[SDWebImageManager sharedManager].imageCache clearMemory]; //立即清除缓存

    }

    4、如果用到蒲公英打包的时候,可以做一个蒲公英自动更新功能,蒲公英官网有sdk文档,可以参照。

  • 相关阅读:
    【转】linux shell I/O重定向小结
    vnc 最近打开
    [转]设置修改CentOS系统时区/时间
    【转】动态链接库、静态库区别与VS2005项目相关设置
    更改默认shell
    19个PHP模板引擎
    const char*, char const*, char*const的区别
    按任意键继续
    [转]CentOS设置服务开机自动启动
    centos 修改eth2为eth0
  • 原文地址:https://www.cnblogs.com/includeao/p/8946060.html
Copyright © 2011-2022 走看看