Skip to content

novawei/WNUtils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WNUtils

Overview

using category to simplify method usage.

including:

  • UIColor+WNUtils
  • NSDate+WNUtils using c function to format date. #import <time.h>
  • UIBarButtonItem+WNUtils

Usage

  • UIColor+WNUtils
[UIColor colorWithHex:0xff0000];
[UIColor colorWithHex:0x000000 alpha:0.5];
  • NSDate+WNUtils
[NSDate prettyDateDescription:[[NSDate date] timeIntervalSince1970]]; // e.g.  1分钟前|2小时前|昨天
[date prettyDateDescription];

[NSDate dateTimeDescription:[[NSDate date] timeIntervalSince1970]]; // e.g. 2016-04-20 12:00
[NSDate dateDescription:[[NSDate date] timeIntervalSince1970]]; // e.g. 2016-04-19
  • UIBarButtonItem+WNUtils

License

MIT

About

using category to simplify method usage

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published