Commit 018719d0 authored by jz's avatar jz

add files

parent fcc2cd96
//
// UIResponder+router.h
// AFNetworking
//
// Created by Q14 on 2020/8/10.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
typedef void(^GMRouterBlock)(NSDictionary *params);
@interface UIResponder (router)
@property (nonatomic, copy) GMRouterBlock routerBlock;
@end
NS_ASSUME_NONNULL_END
//
// UIResponder+router.m
// AFNetworking
//
// Created by Q14 on 2020/8/10.
//
#import "UIResponder+router.h"
#import <objc/runtime.h>
@implementation UIResponder (router)
- (GMRouterBlock)routerBlock {
return objc_getAssociatedObject(self, @selector(routerBlock));
}
- (void)setRouterBlock:(GMRouterBlock)routerBlock {
objc_setAssociatedObject(self, @selector(routerBlock), routerBlock, OBJC_ASSOCIATION_COPY_NONATOMIC);
}
@end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment