KJCategories
Collection of native ios extensions and classes to boost development process. Such as UIKit, Foundation, QuartzCore, Accelerate, OpenCV, CoreGraphics, os and more. 超实用开发加速工具库
Install / Use
/learn @yangKJ/KJCategoriesREADME
KJCategories
<p align="left"> <img src="Screenshots/AT.jpeg" width="800" hspace="1px"> </p><font color=red size=3>Set of Extensions and Custom control for standard types and classes.</font>
<font color=red>Just like Doraemon’s pocket, has an endless variety of props for us to use.</font>
English | 简体中文
- [x] OpenCV: Hough correction, feature extraction, image processing package, morphological processing, filter processing, photo restoration, etc.
- [x] NSArray: Related processing of the elements in the array, etc.
- [x] NSDate: Time transformation, etc.
- [x] UIButton: Emitter animation, image and text mixing, click event encapsulation, expanded click field, time interval limit, countdown, click particle effect, etc.
- [x] UIView: Gesture package, rounded corner gradient, Xib attribute, basic animation package, etc.
- [x] UITextView: Expand the input box, limit the number of words, cancel processing, get the internal hyperlink of the text, etc.
- [x] UITextField: Placeholder color, line, graphic processing, etc.
- [x] UILabel: Rich text, fast display text position, etc.
- [x] UIImage: Screenshot and cropping, image compression, mask processing, image stitching, image size processing, filter rendering, flooding algorithm, etc.
- [x] UIImage: QR code, barcode generation, dynamic image playback, watermark processing, etc.
- [x] NSObject: GCD, asynchronous timer, resident thread, thread keep alive, runtime methods, etc.
- [x] NSString: Hash crypto, mathematical operators, unit conversion, etc.
- [x] Other: Gradient slider, Open screen particle animation, projection and shadow, etc.
Encapsulation exception Handling FoggyDemo
<a id="Contents"></a> Contents
- OpenCV
- NSArray
- NSDate
- NSDictionary
- NSObject
- NSString
- UIButton
- UIColor
- UIDevice
- UIImage
- UILabel
- UISlider
- UITextField
- UITextView
- UIView
- UIViewController
- CustomizedControl
Methods and Functions
<a id="OpenCV"></a>OpenCV
- Opencv picture processing.
| Description | Signatures | | ---- | ---- | | Picture Tile | kj_opencvTiledRows:cols: | | Four-point perspective image based on perspective | kj_opencvWarpPerspectiveWithKnownPoints:size: | | Eliminate image highlights | kj_opencvIlluminationChangeBeta:alpha: | | Picture Blending | kj_opencvBlendImage:alpha: | | Adjust picture brightness and contrast | kj_opencvChangeContrast:luminance: | | Modify the color of the picture channel value | kj_opencvChangeR:g:b: | | Blur processing | kj_opencvBlurX:y: | | Gaussian Blur | kj_opencvGaussianBlurX:y: | | Median Blur | kj_opencvMedianBlurksize: | | Gaussian Bilateral Blur | kj_opencvBilateralFilterBlurRadio:sigma: | | Custom linear blur | kj_opencvCustomBlurksize: | | Morphology operations | kj_opencvMorphology:element: | | Remove watermark | kj_opencvInpaintImage: | | Picture repair, effect enhancement processing | kj_opencvRepairImage | | Cut out the largest inner rectangular area | kj_opencvCutMaxRegionImage | | Feature extraction | kj_opencvFeatureExtractionFromSobel | | Hough line judgment and correction | kj_opencvHoughLinesCorrectTextImageFillColor: |
<a id="NSArray"></a>NSArray
- Related processing of the elements in the array.
| Description | Signatures | | ---- | ---- | | Is it empty| isEmpty | | Filter data | kj_detectArray: | | Multidimensional array data | kj_detectManyDimensionArray: | | Search data | kj_searchObject: | | Map | kj_mapArray: | | Insert data to the destination | kj_insertObject: | | Array calculation intersection | kj_arrayIntersectionWithOtherArray: | | Array calculation difference| kj_arrayMinusWithOtherArray: | | Randomly Disorganize Array | kj_disorganizeArray | | Delete the same element in the array| kj_delArrayEquelObj | | Binary Search| kj_binarySearchTarget: | | Bubble Sort| kj_bubbleSort | | Insert Sort | kj_insertSort | | Selection Sort| kj_selectionSort |
<a id="NSDate"></a>NSDate
- Time transformation.
| Description | Signatures | | ---- | ---- | | Convert date to local time | kj_localeDate | | Time string conversion NSDate | kj_dateFromString: | | Time string to NSDate | kj_dateFromString:format: | | Get the current timestamp | kj_currentTimetampWithMsec: | | Timestamp to time | kj_timeWithTimestamp:format: | | Get the UTC timestamp of the specified time | kj_timeStampUTCWithTimeString: |
<a id="NSDictionary"></a>NSDictionary
- Dictionary common methods.
| Description | Signatures | | ---- | ---- | | Is it empty | isEmpty | | Convert to Josn String | jsonString | | Whether to include a key | kj_containsKey: | | Dictionary keys in ascending order | kj_keysSorted | | Dictionary key Description descending order | kj_keySortDescending | | Quickly traverse the dictionary | kj_applyDictionaryValue: | | Mapping | kj_mapDictionary: | | Merge | kj_mergeDictionary: | | Selector | kj_pickForKeys: | | Remover | kj_omitForKeys: |
<a id="UIView"></a>UIView
- Advanced Edition Rounded Corners and Border Extension.
| Description | Signatures | | ---- | ---- | | Bezier Fillet | bezierRadius | | Shadow Offset | shadowOffset | | Shadow Opacity | shadowOpacity | | Shadow Width | shadowWidth | | Shadow rounded corners | shadowRadius | | Shadow Color | shadowColor | | Corner Radius | cornerRadius | | Border Width | borderWidth | | Border Color | borderColor | | Image properties | viewImage | | Top Controller | topViewController | | Current Controller | viewController | | Current Controller | kj_currentViewController | | View created by Xib | kj_viewFromXib | | View created by Xib | kj_viewFromXibWithFrame: | | Fillet radius | kj_radius | | Rounded corner orientation | kj_rectCorner | | Border Color | kj_borderColor | | Border width | kj_borderWidth | | Border Orientation | kj_borderOrientation | | Size | size | | Location | origin | | x coordinate | x | | y coordinate | y | | Width | width | | Height | height | | Center point x | centerX | | Center point y | centerY | | Left distance | left | | Right distance | right | | Top distance | top | | Bottom distance | bottom | | x + width | maxX | | y + height | Property |maxY | | After Masonry layout x | masonry_x | | After Masonry layout y | masonry_y | | Masonry width after layout | masonry_width | | Masonry height after layout | masonry_height | | Center the view in its parent view | kj_centerToSuperview | | Distance from the right of the parent view | kj_rightToSuperview: | | Distance from the bottom of the parent view | kj_bottomToSuperview: | | Get the highest Y of the subview | kj_subviewMaxY | | Get the highest X of the subview | kj_subviewMaxX | | Find Subview | kj_FindSubviewRecursively: | | Remove all subviews | kj_removeAllSubviews | | Hide/Show all subviews | kj_hideSubviews:operation: | | Child controls handle gesture events | kj_childHitTest:withEvent: |
<a id="UITextView"></a>UITextView
- UITextView undo processing, equivalent to command + z, limit processing.
| Description | Signatures | | ---- | ---- | | Whether to enable the undo function | kOpenBackout | | Cancel input | kj_textViewBackout | | Placeholder text | placeHolder | | Placeholder Label | placeHolderLabel | | Limit word count | limitCount | | Right margin of restricted area | limitMargin | | Restricted area height | limitHeight | | Statistics limit the number of words Label | limitLabel |
<a id="UITextField"></a>UITextField
- UITextField input box extension, placeholder, quick setting account password box.
| Description | Signatures | | ---- | ---- | | Set the bottom border line color | bottomLineColor | | Placeholder Color | placeholderColor | | PlaceholderFontSize | placeholderFontSize | | Maximum Length | maxLength | | Clear text to dark text switch | securePasswords | | Maximum character length reached | kMaxLengthBolck | | Text editing moment callback | kTextEditingChangedBolck |
<a id="UILabel"></a>UILabel
- UILabel add long press copy function, Get text position and size.
| Description | Signatures | | ---- | ---- | | Can copy | copyable | | Remove copy long press gesture | kj_removeCopyLongPressGestureRecognizer | | Set the display position of the text content | customTextAlignment | | Get width | kj_calculateWidth | | Get height | kj_calculateHeightWithWidth: | | Get height, specify line height | kj_calculateHeightWithWidth:OneLineHeight: | | The text line spacing between Ranges | kj_AttributedStringTextLineSpace: | | Text size between ranges | kj_AttributedStringTextFont:Range: | | Text color between Ranges | kj_AttributedStringTextColor:Range: | | Text size and color between Ranges | kj_AttributedStringTextFont:TextColor:Range: | | Text related attributes between Ranges | kj_AttributedStringTextAttributes:R
