Markdown的基本使用记录

208 阅读2分钟

一级标题

二级标题

关于字体

  1. 斜体1 斜体2
  2. 加粗1 加粗2
  3. 斜体加粗1 斜体加粗2
  4. 这是不要的文字

标注

幸福的概念是什么 1

添加图片

  • 方法1
  • 方法2

添加分割线(三个以上: - 或者 * 或者 _)





制作表格

姓名性别年龄学历
张三19本科
李四20研究生

链接

  • 直接设置链接

  • 通过变量设置链接,在文档的结尾为变量赋值

    • 点击链接去百度 Baidu
    • 点击链接去谷歌 Google

列表

  • 第一点
    • 第一小节
      • 第一部分
  • 第二点
    • 第一小节
  • 第三点(有序)
    1. 店铺商品
    2. 店铺分类
    3. 评论管理

区块

  1. 第一章节
    • 第1小课内容
    • 第2小课内容
  2. 第二章节(前面写1也会显示2)
    • 第1小课内容
    • 第2小课内容
  • Happy Ending
    • 第1小课内容
    • 第2小课内容
  • 最后的总结
  • 第一项

    子目录1(末尾加两个空格就换行了)
    子目录2
    子目录3

  • 第二项

代码 或者 着重显示

  • hello world
  • hello world

代码区块

  • 方法1:用```
+(void)load{
    Method method1 = class_getInstanceMethod(self, @selector(currentPrice));
    Method method2 = class_getInstanceMethod(self, @selector(wj_currentPrice));
    method_exchangeImplementations(method1, method2);
    
    Method method3 = class_getClassMethod(self, @selector(cloneProduct:toContext:));
    Method method4 = class_getClassMethod(self, @selector(wj_cloneProduct:toContext:));
    method_exchangeImplementations(method3, method4);
}
-(NSDecimalNumber *)wj_currentPrice{
    return [self memberPriceWithOriginalPrice:[self wj_currentPrice]];
}

-(void)setCurrentPrice:(NSDecimalNumber *)currentPrice{
    objc_setAssociatedObject(self, currentPriceKey, currentPrice, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

-(NSDecimalNumber *)currentPrice{
    return objc_getAssociatedObject(self, currentPriceKey);
}
  • 方法2: 用制表符tab键 or 四个空格(一个tab不行就两个,有时候跟列表符冲突)

      - (void)setUserInfo:(NSString *)userInfo {
      objc_setAssociatedObject(self, kUIViewUserInfoKey, userInfo, OBJC_ASSOCIATION_COPY);
      }
      - (NSString*)userInfo{
      return objc_getAssociatedObject(self, kUIViewUserInfoKey);
      }
    

Footnotes

  1. 每天做着喜欢的事情,财富自由,开开心心