鍒嗙被馃殌,濂界敤鐨勫皬宸ュ叿馃敤
Clone or download
Fetching latest commit鈥
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
WHKit
WHKitDemo
.gitignore
LICENSE
README.md
WHKit.podspec

README.md

WHKit

鍒嗙被,寮鍙戝皬宸ュ叿

浣跨敤鏂规硶

pod 'WHKit', '~>1.7'
濡傛灉娌℃壘鍒, 璇峰厛pod setup

涔熷彲浠ョ洿鎺ュ湪鏈綉椤典笅杞斤紝鐒跺悗鎶奧HKit鏂囦欢鍔犲叆鍒板伐绋嬩腑浣跨敤

鍦ㄤ娇鐢ㄧ殑鍦版柟锛#import "WHKit.h"
鎺ㄨ崘鐩存帴鍦╬ch鏂囦欢涓細#import "WHKit.h"

杩欎釜鏂囦欢涓寘鍚簡濡備笅鍐呭

/************* 鍒嗙被 *************/
#import "NSArray+WHArray.h"
#import "NSDate+WHDate.h"
#import "NSDictionary+WHDictionary.h"
#import "NSFileManager+WHFileManager.h"
#import "NSNumber+WHNumber.h"
#import "NSObject+WHObject.h"
#import "NSObject+WHRuntime.h"
#import "NSString+WHString.h"
#import "NSTimer+WHTimer.h"
#import "UIBarButtonItem+WHBarButtonItem.h"
#import "UIButton+WHButton.h"
#import "UIColor+WHColor.h"
#import "UIDevice+WHDevice.h"
#import "UIImage+WHImage.h"
#import "UIImageView+WHImageView.h"
#import "UILabel+WHLabel.h"
#import "UINavigationController+WHNavigationController.h"
#import "UIScrollView+WHScrollView.h"
#import "UITableView+WHTableView.h"
#import "UIView+WHView.h"
#import "UIViewController+WHVC.h"
#import "WHMethods.h"
#import "SerializeKit.h"
#import "WHSingleton.h"
#import "CALayer+WHLayer.h"
#import "UIAlertController+WHAlert.h"
#import "Foundation+Safe.h"
/******************************/



/************* 瀹 *************/
#import "WHMacro.h"
/******************************/

渚嬪瓙 Example

//鐐瑰嚮鎸夐挳
[button wh_addActionHandler:^{
  NSLog(@"鎴戣鐐瑰嚮浜");
}];

//鏄惁涓篿Phone X鐨勫畯锛岃繑鍥濨OOL鍊
if (kIs_iPhoneX ) { ... }

//蹇熷垱寤哄崟渚
WHSingletonH(ClassName)
WHSingletonM(ClassName)

//蹇熷垱寤轰竴涓狟utton, 鍏朵腑KBLACK_COLOR鏄鑹茬殑瀹
UIButton *button = [UIButton wh_buttonWithTitle:@"Test" backColor:KBLACK_COLOR backImageName:nil titleColor:KWHITE_COLOR fontSize:14 frame:CGRectMake(100, 100, 50, 50) cornerRadius:7];

//鏀瑰彉鎵嬫満鐘舵佹爮鐨勯鑹
[WHMethods wh_setStatusBarBackgroundColor:[UIColor lightGrayColor]];

//楂樻晥娣诲姞鍦嗚鍥剧墖
- (UIImage*)wh_imageAddCornerWithRadius:(CGFloat)radius andSize:(CGSize)size;

/** mac鍦板潃*/
NSString *macAddress = [UIDevice macAddress];

/**鍙嶈浆鏁扮粍*/
- (NSArray *)wh_reverseArray;

//鑾峰緱涓鑸ā鍨嬪睘鎬
-(void)wh_createProperty;

/**鏍规嵁宸﹁竟鍜屽彸杈圭殑瀛楃涓,鑾峰緱涓棿鐗瑰畾瀛楃涓*/
- (NSString*)wh_substringWithinBoundsLeft:(NSString*)strLeft right:(NSString*)strRight;

/**@brief  娓愬彉棰滆壊*/
+ (UIColor*)wh_gradientFromColor:(UIColor*)fromColor toColor:(UIColor*)toColor withHeight:(CGFloat)height;

MIT LICENSE