一、首先第一步,我们在简书的设置中选择MarkDowm,如下图:
1BB35C1C-A11B-436B-A70B-E2A4BB3C20EE.png
二、将代码复制到简书中,并在代码开始和结束点击三次table&1按钮左侧的按钮(在英文输入状态下),如图: 85EB441ABA243E8BE084AC7DAB0C473B.jpg
57023B99-2499-4C9C-8C6A-619EA14BA9F7.png
三、然后发布文章,就大功告成了。
+ (BOOL)gl_swizzleMethod:(SEL)origSel withMethod:(SEL)altSel {
Method origMethod = class_getInstanceMethod(self, origSel);
Method altMethod = class_getInstanceMethod(self, altSel);
if (!origMethod || !altMethod) {
return NO;
}
class_addMethod(self,
origSel,
class_getMethodImplementation(self, origSel),
method_getTypeEncoding(origMethod));
class_addMethod(self,
altSel,
class_getMethodImplementation(self, altSel),
method_getTypeEncoding(altMethod));
method_exchangeImplementations(class_getInstanceMethod(self, origSel),
class_getInstanceMethod(self, altSel));
return YES;
}
网友评论