YHBeginTime.m
603 Bytes
//
// NSObject+YHBeginTime.m
// YHAnimationDemo
//
// Created by gaoqiang xu on 2/9/15.
// Copyright (c) 2015 gaoqiang. All rights reserved.
//
#import "YHBeginTime.h"
#import <objc/runtime.h>
static char kYHAnimateBeginTimeKey;
@implementation NSObject (YHBeginTime)
- (CFTimeInterval)pop_beginTime {
NSNumber *beginTime = objc_getAssociatedObject(self, &kYHAnimateBeginTimeKey);
return [beginTime doubleValue];
}
- (void)setPop_beginTime:(CFTimeInterval)beginTime {
objc_setAssociatedObject(self, &kYHAnimateBeginTimeKey, @(beginTime), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
@end