ifish/Ifish/controllers/IfishTabControllers/消息/IfishIMFiles/Sessions/Util/NTESTimerHolder.h

31 lines
832 B
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// NTESTimerHolder.h
// NIM
//
// Created by amao on 5/16/14.
// Copyright (c) 2014 amao. All rights reserved.
//
//M80TimerHolder管理某个Timer功能为
//1.隐藏NSTimer,使得NSTimer只能retain M80TimerHolder
//2.对于非repeats的Timer,执行一次后自动释放Timer
//3.对于repeats的Timer,需要持有M80TimerHolder的对象在析构时调用[M80TimerHolder stopTimer]
#import <Foundation/Foundation.h>
@class NTESTimerHolder;
@protocol NTESTimerHolderDelegate <NSObject>
- (void)onNTESTimerFired:(NTESTimerHolder *)holder;
@end
@interface NTESTimerHolder : NSObject
@property (nonatomic,weak) id<NTESTimerHolderDelegate> timerDelegate;
- (void)startTimer:(NSTimeInterval)seconds
delegate:(id<NTESTimerHolderDelegate>)delegate
repeats:(BOOL)repeats;
- (void)stopTimer;
@end