《省钱达人》与《猎豆优选》UI相同版。域名tbk

NSString+CCFunction.h 812B

123456789101112131415161718192021222324252627282930313233343536373839
  1. //
  2. // NSString+CCFunction.h
  3. // YouHuiProject
  4. //
  5. // Created by 小花 on 2018/1/25.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <UIKit/UIKit.h>
  10. @interface NSString (CCFunction)
  11. - (CGSize)stringSizeWithFont:(UIFont *)font;
  12. - (NSUInteger)getBytesLength;
  13. - (NSString *)stringByDeletingPictureResolution;
  14. + (BOOL)checkRoomNumber:(NSString *)roomNumber;
  15. + (BOOL)checkUserName:(NSString*) username;
  16. + (BOOL)checkPassword:(NSString*) password;
  17. + (BOOL)checkNickName : (NSString*) nickName;
  18. + (BOOL)checkPullUrl: (NSString *) pullUrl;
  19. /**
  20. * 计算文本占用的宽高
  21. *
  22. * @param font 显示的字体
  23. * @param maxSize 最大的显示范围
  24. *
  25. * @return 占用的宽高
  26. */
  27. - (CGSize)sizeWithFont:(UIFont *)font maxSize:(CGSize)maxSize;
  28. @end