zoukankan      html  css  js  c++  java
  • 多线程里处理

    t is true that apple recommends using elements from the UIKIt on the main thread:

    Note: For the most part, UIKit classes should be used only from an application’s main thread. This is particularly true for classes derived from UIResponder or that involve manipulating your application’s user interface in any way.

    Since UIImage isn't derived from UIResponder, and you do not actually display it on the interface/screen. Then doing operations with UIImages on another thread should be safe.

    This is however based on my experience, I haven't seen any official documentation about it.

      照相机,选取图片在图片处理可以使用线程来处理,避免卡顿。

    http://inessential.com/2013/12/20/observers_and_thread_safety

    在线程立马post notification会有什么效果?小心observer被回收了,导致app crash。 

    1.要么你保证obsever在post notification之后会后

    2.使用block api 

    3. 保证不被回收

    4. 不在线程里面post notification

  • 相关阅读:
    RPA浏览器及word需要注意的点
    捕获alert弹框
    创建文件夹
    Excel 筛选功能
    RPA_播放语音
    flask路由
    python操作git
    RPA_关键词识别
    初始flask
    RPA中需要注意的问题
  • 原文地址:https://www.cnblogs.com/studyNT/p/4585421.html
Copyright © 2011-2022 走看看