zoukankan      html  css  js  c++  java
  • 各种 SDk

    计时器:(目标动作)

    定义枚举类型

    typedef enum : NSUInteger {//enum枚举 integer整型   typedef定义类型
        TimerTypeOnce,
        TimerTypeCircle,
    } TimerType;

    声明方法:+设置目标动作回调

    -(void)startWithType:(TimerType)type Duriation:(double)t;
    -(void)stop;
    -(void)addTarget:(id)target Action:(SEL)action;

    计时器(delegate)

    定义枚举类型+声明协议 protocol

    typedef enum : NSUInteger {
        TimerTypeOnce,
        TimerTypeCircle,
    } TimerType;
    
    @protocol TimerDelegate;

    引用协议+声明方法+实现协议

    @property(nonatomic,weak)id<TimerDelegate>delegate;
    
    -(void)startWithType:(TimerType)type Duriation:(double)t;
    -(void)stop;
    
    @end
    
    @protocol TimerDelegate <NSObject>
    
    -(void)timerDidEnd:(TimerD *)t;

    计时器(Block)

    定义枚举类型+定义Block回调void(^类名)(回调类型)

    typedef enum : NSUInteger {
        TimerTypeOnce,
        TimerTypeCircle,
    } TimerType;
    typedef void(^TB)(void)

    定义类名(strong)方法名????

    定义方法

  • 相关阅读:
    神经网络
    机器学习英语
    机器学习常用函数解析
    机器学习(二)
    机器学习(三)
    Python文本数据分析与处理
    数据分析
    sklearn
    「Poetize9」升降梯口
    「Poetize9」礼物运送
  • 原文地址:https://www.cnblogs.com/quwujin/p/4968489.html
Copyright © 2011-2022 走看看