IOS easy to use classification tools, so that the development of simpler WHCategory

Objective

This article will share with you my own collection of WHCategory, which can further enhance your iOS development efficiency by using this classification tool. (support Pod, if pod does not arrive, please pod setup first)


Example

I’ve been using WHCategory in my own project, and here are a few chestnuts.

1. click the event with more concise buttons

The general button click event needs to be written separately by a doSomething method (Figure 1). After using WHCategory, you can directly doSomething in block (Figure 2).

IOS easy to use classification tools, so that the development of simpler WHCategory
Figure 1 ordinary button click event
IOS easy to use classification tools, so that the development of simpler WHCategory
, figure 2, using WHCategory

2. quickly create controls

Creating a control usually involves setting up many parameters (Figure 3), and you can create a more convenient control using WHCategory (Figure 4, where the color macro is also WHCategory). Not only can you quickly create buttons, the navigation bar UIBarButtonItem, UILable and other controls can be quickly created. (more convenient features can be downloaded for trial use)

IOS easy to use classification tools, so that the development of simpler WHCategory
Diagram 3 create Button in plain mode
IOS easy to use classification tools, so that the development of simpler WHCategory
, figure 4, quick creation of Button

3., screenshots, efficient add fillet, blurred pictures, grayscale images and other picture processing

(Figure 5) you can get a screenshot of the picture, efficiently set the fillet for the picture, add blur to the picture, get grayscale pictures, rotate the picture. (and more picture processing functions, please download the trial)

IOS easy to use classification tools, so that the development of simpler WHCategory,
, figure 5, multiple picture processing

4. add tap gestures for view

(Figure 6) after clicking on view, you can easily respond directly to the block. (there are more features waiting for you to try.)

IOS easy to use classification tools, so that the development of simpler WHCategory
, Figure 6, click View

5. get device related information

(Figure 7) obtaining information about the device

IOS easy to use classification tools, so that the development of simpler WHCategory
Figure 7 device related information

6. time

Turn the time into a string (Figure 8), a variety of methods (Figure 9). (and more useful time for sorting.)

IOS easy to use classification tools, so that the development of simpler WHCategory
diagram 8 converts time to string
IOS easy to use classification tools, so that the development of simpler WHCategory,
, figure 9, a variety of methods

7. use regular expressions to validate formats

(Figure 10) validation of format validation (and more validation methods)

IOS easy to use classification tools, so that the development of simpler WHCategory
, figure 10 verify that this is valid

8. many useful macros are in WHMacro.h

IOS easy to use classification tools, so that the development of simpler WHCategory
gets the path
IOS easy to use classification tools, so that the development of simpler WHCategory
time interval
IOS easy to use classification tools, so that the development of simpler WHCategory,
, NSLog, APP version, system version
IOS easy to use classification tools, so that the development of simpler WHCategory
adds fillet and border to view

Not only that, more methods in WHCategory are waiting for you to use.


Usage method

1. directly to download GitHub (you can easily point to a star, thank you): https://github.com/remember17/WHCategory of the WHCategory file into the project, where needed #import WHCategory.h 2. using the CocoaPods installation to the project: pod’WHCategory’pod if not, please pod setup, pod’WHCategory’ and #import &lt where needed WHCategory.h>
;


GitHub address: https://github.com/remember17