博客美化测试

查看代码show the code

// @property = iVar + setter + getter

// 默认是atomic原子的 读写线程安全但耗性能 一般设置nonatomic是非原子的 节省开销

//基本数据类型
@property (nonatomic,assign) int age;
@property (nonatomic,assign) float distance;
@property (nonatomic,assign) double aValue;
@property (nonatomic,assign) NSInteger count1;
@property (nonatomic,assign) NSUInteger count2;
@property (nonatomic,assign) CGFloat number1;
//枚举类型
@property (nonatomic,assign) NSTextAlignment align;
//结构体
@property (nonatomic,assign) CGSize size;
@property (nonatomic,assign) CGRect frame;
//代理委托
@property (nonatomic,assign) id assignDelegate;
@property (nonatomic,weak) id weakDelegate;
//弱引用属性
@property (nonatomic,weak) ShareManager *weakManager;
//IB拉线视图
@property (nonatomic,weak) IBOutlet UIView *testView;
//字符串
@property (nonatomic,copy) NSString *name;
//block/闭包
@property (nonatomic,copy) dispatch_block_t block;
//强引用对象
@property (nonatomic,strong) NSArray *arr;
@property (nonatomic,strong) NSMutableArray *arrM;
@property (nonatomic,strong) NSDictionary *dic;
@property (nonatomic,strong) NSMutableArray *dicM;
@property (nonatomic,strong) ShareManager *strongManager;
//默认是readwrite 对于外部引用是可读可写 设置readonly是只读
@property (nonatomic,strong,readonly) ShareManager *strongManager2;

动画类型 代码示例
最为常见的block动画
     /// 参数一 : 时长
/// 参数二 : 执行动画块
/// 参数三 : 动画结束时回调
[UIView animateWithDuration:0.25 animations:^{
//做动画: 修改视图大小位置,透明度,颜色,transform等属性
} completion:^(BOOL finished) {
//动画结束回调
}];

/// 参数一 : 时长
/// 参数二 : 延时几秒执行
/// 参数三 : 动画函数枚举
/// 参数四 : 执行动画块
/// 参数五 : 动画结束时回调
[UIView animateWithDuration:0.25 delay:1.0 options:(UIViewAnimationOptionAllowUserInteraction) animations:^{
//执行动画
} completion:^(BOOL finished) {
//动画结束回调
}];  

Codepen代码嵌入

    

See the Pen MogbxY by dragonir (@dragonir) on CodePen.

尝试一下 Carbon代码片段的展示

flow st=>start: Start op=>operation: Your Operation cond=>condition: Yes or No? e=>end: over st->op->cond cond(yes)->e cond(no)->op ​

mermaid graph LR; A[Import] -->B[Tidy] B -->C{Understand} C -->D[Transform] C -->E[Vishualise] C -->F[Model] Understand -->G[Communicate] ​

​```sequence

Title: Here is title
Alice->Bob: Hello Bob, how are you?
Note right of Bob: Bob thinks
Bob-->Alice: I am good thanks!

​```

graph LR; Android == 请求数据 ==> 接口 接口 == 查询数据库 ==> 数据库 数据库 == 返回查询结果 ==> 接口 接口 == 返回数据 ==> Android
posted @ 2020-03-15 10:53  CoderWGB  阅读(319)  评论(0)    收藏  举报