• 二、iOS开发中常用的单例(持续更新)


    1、UIApplication(应用程序实例)

    获取方式:[UIApplication sharedApplication]

    详细:http://www.cnblogs.com/hissia/p/5678518.html

    2、NSNotificationCenter(消息中心)

    获取方式:[NSNotificationCenter defaultCenter]

    常用的通知模式

    3、NSFileManager(文件管理)

    获取方式:[NSFileManager defaultManager]

    4、NSUserDefaults(偏好设置)

    获取方式:[NSUserDefaults standardUserDefaults]

    详细:http://www.cnblogs.com/hissia/p/5642405.html

    5、NSURLCache(请求缓存)

    获取方式:[NSURLCache sharedURLCache]

    6、NSHTTPCookieStorage(应用程序cookies池)

    获取方式:[NSHTTPCookieStorage sharedHTTPCookieStorage]

    7、NSURLSession(发送请求时候用的)                

    获取方式:[NSURLSession sharedSession]

    8、UIMenuController(弹出的菜单可以选择,复制,剪切,粘贴的功能)      

    获取方式:[UIMenuController sharedMenuController]

    详细:http://www.cnblogs.com/hissia/p/5668513.html

  • 相关阅读:
    springboot(6)-热部署
    springboot(5)-文件上传
    ubuntu修改tomcat使用的jdk
    jstack使用
    HeapAnalyzer如何使用
    查看linux下tomcat使用的jdk版本
    ubuntu-tomcat安装目录
    vi命令
    211java-jdk安装记录
    linux的java安装目录
  • 原文地址:https://www.cnblogs.com/hissia/p/5682520.html
Copyright © 2020-2023  润新知