New file |
| | |
| | | // |
| | | // NSObject+CustomIndex.m |
| | | // screendisplay |
| | | // |
| | | // Created by 单军华 on 2018/7/9. |
| | | // Copyright © 2018年 单军华. All rights reserved. |
| | | // |
| | | |
| | | #import "NSObject+CustomIndex.h" |
| | | #import <objc/runtime.h> |
| | | |
| | | static const void *customIndexKey = &customIndexKey; |
| | | |
| | | @implementation NSObject (CustomIndex) |
| | | |
| | | - (NSNumber *)customIndex { |
| | | return objc_getAssociatedObject(self, customIndexKey); |
| | | } |
| | | |
| | | - (void)setCustomIndex:(NSNumber *)animating{ |
| | | objc_setAssociatedObject(self, customIndexKey, animating, OBJC_ASSOCIATION_RETAIN_NONATOMIC); |
| | | } |
| | | |
| | | @end |