GiGaMaskTime/GIGA/Common/GiGaHelper.h

74 lines
1.6 KiB
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// GiGaHelper.h
// GIGA
//
// Created by lianxiang on 2018/8/13.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface GiGaHelper : NSObject
/**
* 获取当前时间 格式 yyyy-MM-dd hh:mm:ss
*/
+(NSString *) getNowTimeString;
/**
* 时间转时间戳
*/
+(long) timeStampWithDate:(NSDate *) timeDate;
/**
* 时间戳转时间
*/
+ (NSString *) dateWithTimeStamp:(long) longValue;
/**
* 根据时间间隔获取未来时间戳
hour 几小时
min 几分钟
second 几秒
*/
+(long)getFutureTimetstamp:(NSUInteger)hour minute:(NSUInteger)min second:(NSUInteger)second;
/**
* 系统当前时间时间戳
*/
+(long)getNowDateTimestamp;
/**
* NSTimeInterval 转分钟秒
*/
+(NSString *)stringWithNSTimerinterval:(NSTimeInterval)interval;
//计算文字的长度
+ (CGSize)sizeWithText:(NSString *)text font:(UIFont *)font maxSize:(CGSize)maxSize;
+(CGFloat)getSpaceLabelHeight:(NSString*)str withFont:(UIFont*)font maxSize:(CGSize)maxSize;
+(void)setLabelSpace:(UILabel*)label withValue:(NSString*)str withFont:(UIFont*)font;
/**
是否是手机号
*/
+(BOOL)isPhoneNumber:(NSString*)mobileNumber;
+(NSAttributedString *)stringWithText:(NSString *)title textColor:(UIColor *)color textFont:(UIFont *)font leterSpace:(CGFloat )space;
+(NSString *)convertToJsonData:(NSDictionary *)dict;
+(NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;
/**
620 密码 必须包含数字和字母
@return 必须包含数字和字母
*/
+(BOOL)checkPassWord:(NSString *)pass;
//
+(int)convertToInt:(NSString*)strtemp;
+(NSString*)dictionaryToJson:(NSDictionary *)dic;
@end