Skip to content

Instantly share code, notes, and snippets.

@github-xiaogang
github-xiaogang / debugging.m
Last active November 2, 2015 07:02
替换Xcode打印日志中的unicode为中文
#if DEBUG
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
@implementation NSObject (DEBUGGING)
+ (void)replaceClassMethodWithClass: (Class)clazz originMethod: (SEL)originMethodSEL withMethod: (SEL)newMethodSEL
{
Method originMethod = class_getInstanceMethod(clazz, originMethodSEL);