zoukankan      html  css  js  c++  java
  • NSTimer

    NSTimer是Cocoa中比较常用的定时器类,基本操作如下:
    handleTimer方法可以自行定义。在需要的地方创建timer即可,handleTimer就可以每0.5秒执行一次。
     
    - (void) handleTimer: (NSTimer *) timer
    {
       //在这里进行处理
    }
     
    NSTimer *timer;
     
    timer = [NSTimer scheduledTimerWithTimeInterval: 0.5
                                                                     target: self
                                                                     selector: @selector(handleTimer:)
                                                                     userInfo: nil
                                                                     repeats: YES];
  • 相关阅读:
    人物-IT-张志东:张志东
    人物-IT-任正非:任正非
    人物-IT-张朝阳:张朝阳
    院校-清华大学:清华大学
    人物-丁磊:丁磊
    人物-李彦宏:李彦宏
    人物-IT-马云:马云
    inittab
    initlocation
    initdb
  • 原文地址:https://www.cnblogs.com/mac_arthur/p/1708328.html
Copyright © 2011-2022 走看看