有时候会有设置角标的需求,如果每次都是手动设置,非常麻烦。
使用SuperCornerMark可以方便快捷的设置角标。
使用方法:
Podfile
platform :ios,'8.0'
target "Demo" do
pod 'biu_SCMark','1.0.3'
end
#import <biu_SCMark/SCMark.h>
...
SCMColorModel *cModel = [[SCMColorModel alloc]init];
cModel.display_name = @"左上角标";
cModel.background_color = [UIColor redColor];
cModel.text_color = [UIColor blueColor];
[self.mView show_up_left_markWithModel:cModel];
SCMColorModel *rcModel = [[SCMColorModel alloc]init];
rcModel.display_name = @"右上角标";
rcModel.background_color = [UIColor redColor];
rcModel.text_color = [UIColor blueColor];
[self.mView show_up_right_markWithModel:rcModel];
SCMColorModel *rdModel = [[SCMColorModel alloc]init];
rdModel.display_name = @"右下 21:10";
rdModel.background_color = [UIColor grayColor];
rdModel.text_color = [UIColor whiteColor];
[self.mView show_down_right_markWithModel:rdModel];
效果图如下:
角标.png
网友评论