iOS AILinkBleSDK - 蓝牙SDK
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

UILabel+WZAdd.m 730B

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // UILabel+WZAdd.m
  3. // 常用UI控件封装
  4. //
  5. // Created by iot_iMac on 2018/6/21.
  6. // Copyright © 2018年 iot_iMac. All rights reserved.
  7. //
  8. #import "UILabel+WZAdd.h"
  9. @implementation UILabel (WZAdd)
  10. + (UILabel *)createWithFrame:(CGRect)frame bgColor:(UIColor *)bgColor text:(NSString *)text textColor:(UIColor *)textColor font:(UIFont *)font align:(NSTextAlignment)align {
  11. UILabel *lbl = [[UILabel alloc] initWithFrame:frame];
  12. lbl.textAlignment = align;
  13. if (text) {
  14. lbl.text = text;
  15. }
  16. if (textColor) {
  17. lbl.textColor = textColor;
  18. }
  19. if (bgColor) {
  20. lbl.backgroundColor = bgColor;
  21. }
  22. if (font) {
  23. lbl.font = font;
  24. }
  25. return lbl;
  26. }
  27. @end