cdts/xdts-ios 3/TreeHole/Code/Gategory/NSString+PYExtension.h
2023-07-27 09:20:00 +08:00

35 lines
730 B
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.

//
// NSString+Extension.h
// 新浪微博
//
// Created by 谢培艺 on 15/12/15.
// Copyright © 2015年 iphone5solo. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface NSString (PYExtension)
/** 计算给定文本的大小*/
- (CGSize)sizeWithMaxWidth:(CGFloat)maxWidth font:(UIFont *)font;
/**
* 秒 --> 具体时间
*/
+ (NSString *)intervalToDateWithIntervalString:(NSString *)intervalString;
/**
* 具体时间 --> 秒
*/
+ (NSString *)dateToIntervalWithDate:(NSDate *)date;
/**
* 用于首页时间显示(刚刚、几分钟前、昨天...
*/
- (NSString *)dateToNowWithDate:(NSDate *)createDate;
/// 时间戳 返回 2018-03-25
+ (NSString *)dayStringFromInterval:(NSTimeInterval)time;
@end