仿照美团lable小圆角
参考:传送门
UILabel *tagLabel = [UILabel new];tagLabel.text= @"减";
tagLabel.textColor = [UIColor whiteColor];tagLabel.font = [UIFont systemFontOfSize:12];tagLabel.layer.backgroundColor= [UIColor greenColor].CGColor;tagLabel.layer.cornerRadius =2;
[self.navigationController.navigationBar setBackgroundImage:[[UIImage alloc] init] forBarMetrics:UIBarMetricsDefault];
self.navigationController.navigationBar.shadowImage= [[UIImage alloc]init];
一个tableView延迟加载图片的思路
这种实现利用NSDefaultRunLoopMode 在不干扰主线程的情况下 当cpu有空闲的时候去加载图片
Masonry一些取巧的操作
1.make.edges.equalTo(view2);edges:边缘(让2边的边缘都相等).
2.make.centerY.mas_equalTo(self.distanceLabel);(可以理解为2个控件的中线水平对齐)