一键喂鱼和功率显示
This commit is contained in:
@@ -65,6 +65,7 @@ typedef enum{
|
||||
+ (BOOL)isIphoneX;
|
||||
//校验是否是数字
|
||||
+(BOOL)isNumber:(NSString *)str;
|
||||
+ (UIImage *)createImageWithColor:(UIColor *)color;
|
||||
//******************************输入内容正确性校验*****************************************//
|
||||
#pragma 正则匹配手机号
|
||||
+ (BOOL)checkTelNumber:(NSString *) telNumber;
|
||||
|
||||
@@ -646,6 +646,17 @@ if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
|
||||
|
||||
titleLabel.attributedText = attributedString;
|
||||
}
|
||||
+ (UIImage *)createImageWithColor:(UIColor *)color {
|
||||
CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f);
|
||||
UIGraphicsBeginImageContext(rect.size);
|
||||
CGContextRef context = UIGraphicsGetCurrentContext();
|
||||
CGContextSetFillColorWithColor(context, [color CGColor]);
|
||||
CGContextFillRect(context, rect);
|
||||
UIImage *theImage = UIGraphicsGetImageFromCurrentImageContext();
|
||||
UIGraphicsEndImageContext();
|
||||
|
||||
return theImage;
|
||||
}
|
||||
//设置带圆角带阴影
|
||||
+(void)setShadowCornerRadiusToView:(UIView *)view{
|
||||
view.layer.cornerRadius = kSizeFrom750(10);
|
||||
|
||||
Reference in New Issue
Block a user