Git Product home page Git Product logo

whkit's Introduction

WHKit

分类,开发小工具

如何使用

只需要导入头文件: #import "WHKit.h".

pod WHKit 如果没找到, 请先pod setup, 然后再pod 'WHKit', '~>1.3.0'

使用方法

 a>> 直接在本网页下载使用:#import "WHKit.h"
 b>> 或者利用CocoaPods安装到项目中:#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 "WHMacro.h"
/******************************/

例子 Example

//点击按钮
[button wh_addActionHandler:^{
  NSLog(@"我被点击了");
}];

//快速创建单例
WHSingletonH(ClassName)
WHSingletonM(ClassName)

//快速创建一个Button, 其中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

whkit's People

Contributors

remember17 avatar

Watchers

Pele avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.