仿照美團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延遲加載圖片的思路
這種實現(xiàn)利用NSDefaultRunLoopMode 在不干擾主線程的情況下 當cpu有空閑的時候去加載圖片
Masonry一些取巧的操作
1.make.edges.equalTo(view2);edges:邊緣(讓2邊的邊緣都相等).
2.make.centerY.mas_equalTo(self.distanceLabel);(可以理解為2個控件的中線水平對齊)