preface

  • It took me half a day to sort through the library of tools I normally use, detailing each method attribute
  • Doraemon tool library, just like doraemon pocket, there are endless unexpected various props for us to use

Function is introduced

This library mainly contains several major sections: UIKit class, Foundation class, Language multi-language class, Classes particle effect related, Control custom Control

  • UIButton: Image mixing, click event encapsulation, expand click field, time interval limit, countdown, click particle effect, etc
  • UIView: Gesture encapsulation, rounded gradients, Xib properties, basic animation encapsulation, etc
  • UITextView: Input box extension, word limit, undo processing, get text internal hyperlinks
  • UITextField: placeholder color, lines, graphic processing, etc
  • UILabel: Rich text, quick display of text position
  • UIImage: screenshot and cropping, image compression, mask processing, image stitching, image size processing, filter rendering, flooding algorithm, etc
  • UIImage: TWO-DIMENSIONAL code, bar code generation, dynamic graph play, watermark processing and so on
  • Runtime: lists, method exchange, dynamic inheritance, etc
  • UIDevice: System-related properties,
  • Language: Supports multiple languages and Xib shortcut Settings
  • Foundation: Array and dictionary anti-collapse processing, array algorithm processing, predicate correlation, encryption and decryption, etc
  • Image processing packaging, Hough correction, feature extraction, morphological processing, filter processing and so on

Foundation I also collate encapsulated exception handling Crash protectionKJExceptionDemo

Cocoapods installation

Install the UIKit module

pod 'KJEmitterView'
Copy the code

Foundation Module Installation

pod 'KJEmitterView/Foundation'
Copy the code

Multivoice module

Pod 'KJEmitterView/Language' #Copy the code

Opencv image module

This module needs to import the OpenCV library

Pod 'OpenCV', '~> 4.1.0' pod 'KJEmitterView/ OpenCV' #Copy the code

Particle Effects module

Pod 'KJEmitterView/Classes' # Particle effects relatedCopy the code

Custom control module

Pod 'KJEmitterView/Control' # custom ControlCopy the code

directory

About type Description

Property: attribute Class & Property: Class attribute Protocol: Protocol Instance: Instance method Class: Class method Function: Function

UIView

UIView+KJAnimation simple animation effect chain encapsulation

function type API & Property
An implicit animation Instance kj_animationImplicitDuration:animations:
Show shadow effect when moving Instance kj_movingShadow
Animation group Instance kj_animationMoreAnimations:
Rotate animation effect Instance kj_animationRotateClockwise:makeParameter:
Motion animation Instance kj_animationMovePoint:makeParameter:
Zoom animation effect Instance kj_animationZoomMultiple:makeParameter:
Fade out animation effect Instance kj_animationOpacity:makeParameter:

UIView+KJXib

function type API & Property
Bezier rounded corners Property bezierRadius
Shadow offset Property shadowOffset
Shadow transparency Property shadowOpacity
Width of shadow Property shadowWidth
Rounded corners of the shadows Property shadowRadius
Shadow color Property shadowColor
radius Property cornerRadius
Border width Property borderWidth
Border color Property borderColor
Image properties Property viewImage
Determine if any subviews are scrolling Property anySubViewScrolling
Determine if any subviews are scrolling Instance kj_anySubViewScrolling
Determines whether the control is displayed in the main window Property showKeyWindow
Determines whether the control is displayed in the main window Instance kj_isShowingOnKeyWindow
Top controller Property topViewController
Current controller Property viewController
Current controller Instance kj_currentViewController
View created by the Xib Class kj_viewFromXib
View created by the Xib Class kj_viewFromXibWithFrame:

UIView+KJRectCorner Advanced version of rounded corners and border extensions

function type API & Property
radius Property kj_radius
The rounded bearing Property kj_rectCorner
Border color Property kj_borderColor
Border width Property kj_borderWidth
Border bearing Property kj_borderOrientation

UIView+KJGradient handles and specifies the graphics

function type API & Property
Return gradient Layer Instance kj_GradientLayerWithColors:Frame:Locations:StartPoint:EndPoint:
Generates a gradient background color Instance kj_GradientBgColorWithColors:Locations:StartPoint:EndPoint:
The dashed frame Instance kj_DashedLineColor:lineWidth:spaceAry:
Draw a straight line Instance kj_DrawLineWithPoint:toPoint:lineColor:lineWidth:
Draw a dotted line Instance kj_DrawDashLineWithPoint:toPoint:lineColor:lineWidth:lineSpace:lineType:
Draw a star Instance kj_DrawPentagramWithCenter:radius:color:rate:
Draw a hexagon according to its width and height Instance kj_DrawSexangleWithWidth:LineWidth:StrokeColor:FillColor:
Draw the octagon according to the width and height Instance kj_DrawOctagonWithWidth:Height:LineWidth:StrokeColor:FillColor:Px:Py:

UIView + KJGestureBlock gestures to Block

function type API & Property
Click on the sign Instance kj_AddTapGestureRecognizerBlock:
Signal processing Instance kj_AddGestureRecognizer:block:

UIView+KJFrame lightweight layout

function type API & Property
The size of the Property size
location Property origin
X coordinate Property x
y Property y
The width of the Property width
highly Property height
Center of x Property centerX
Center of y Property centerY
The distance Property left
The right distance Property right
At the top of the distance Property top
At the bottom of the distance Property bottom
x + width Property maxX
y + height Property maxY
After the navigation layout x Property masonry_x
After the navigation layout y Property masonry_y
The width after the navigation layout Property masonry_width
The height after the navigation layout Property masonry_height
Center the view in its parent view Instance kj_centerToSuperview
Distance to the right of the superview Instance kj_rightToSuperview:
Distance from the bottom of the superview Instance kj_bottomToSuperview:
Gets the highest Y of the subview Instance kj_subviewMaxY
Gets the highest X of the subview Instance kj_subviewMaxX
Finding subviews Instance kj_FindSubviewRecursively:
Remove all subviews Instance kj_removeAllSubviews
Hide/show all subviews Instance kj_hideSubviews:operation:
Child controls handle gesture events Instance kj_childHitTest:withEvent:

UITextView

UITextView+KJBackout undo processing, equivalent to Command + z

function type API & Property
Whether to enable the undo function Property kOpenBackout
Revocation of the input Instance kj_textViewBackout

UITextView+KJPlaceHolder

function type API & Property
Placeholder text Property placeHolder
Placeholder Label Property placeHolderLabel

UITextView+KJLimitCounter limit handling

function type API & Property
Limited number of words Property limitCount
Limit the right margin of the region Property limitMargin
Restricted area height Property limitHeight
The number of statistics is limited to Label Property limitLabel

UITextView+KJHyperlink click processing

function type API & Property
Identify the hyperlink url address in the TextView by clicking Instance kj_clickTextViewURLCustom:URLHyperlink:

UITextField

UITextField+KJExtension input box extension, quickly set the account password box

function type API & Property
Sets the bottom border line color Property bottomLineColor
Placeholder color Property placeholderColor
Size of placeholder text Property placeholderFontSize
The maximum length Property maxLength
Switching between plaintext and ciphertext Property securePasswords
The maximum character length is reached Property kMaxLengthBolck
Text edit time callback Property kTextEditingChangedBolck
Set the left view, similar to the account password title Instance kj_leftView:
Set the right view, like a small round fork Instance kj_rightViewTapBlock:ImageName:Width:Padding:

UITabBar

The UITabBar+KJBadge shows a small red dot

function type API & Property
Current number of Tabbars Protocol kj_tabBarCount:
Show little red dots Instance kj_showRedBadgeOnItemIndex:
Hide the little red dot Instance kj_hideRedBadgeOnItemIndex:

UISlider

KJColorSlider Gradient slider

function type API & Property
Array of colors Property colors
Location information for each color Property locations
Height of color Property colorHeight
Border width Property borderWidth
Border color Property borderColor
Callback processing time Property timeSpan
Current progress, for external KVO Property progress
Move callback processing Property kValueChangeBlock
Move end callback processing Property kMoveEndBlock
Resetting the UI Instance kj_setUI

UISlider+KJTapValue Slider click to change the value

function type API & Property
Whether to enable the slider click to modify the value Property kTapValue

UIScrollView

UIScrollView+KJEmptyDataSet DZNEmptyDataSet re-encapsulates the state when there is no data

function type API & Property
Loading or not Property loading
The vertical position of the view Property verticalOffset
Empty data picture name Property loadedImageName
Empty data details Property descriptionText
Refresh button text Property kLoadedButton
View displayed at load time Property kLoadingContentView
Refresh button click event Property kLoadedButtonClick
Other view click events Property kLoadedOtherViewClick

UIResponder

UIResponder+KJChain Response chain processing

function type API & Property
Response Chain details Property kChainDescription
First responder Property kFirstResponder
Instance kj_responderWithClass:
Instance kj_responderSendAction:Sender:

UIResponder+KJAdapt Simple screen scale adaptation

function type API & Property
Design drawing type Protocol kj_adaptModelType:
Horizontal proportional adaptation Function KJAdaptScaleLevel
Vertical proportional fit Function KJAdaptScaleVertical
Adapter CGpoint Function KJAdaptPointMake
Adapter CGSize Function KJAdaptSizeMake
Adapter CGRect Function KJAdaptRectMake
Adapter UIEdgeInsets Function KJAdaptEdgeInsetsMake

UINavigation

UINavigationBar+KJExtension

function type API & Property
Set the navigationBar background color Property kj_BackgroundColor
Set the base transparency Property kj_Alpha
Property kj_TranslationY
reset Instance kj_reset

UINavigationItem+KJExtension Item chain generation

function type API & Property
Chain to generate Instance kj_makeNavigationItem:
ExtendParameterBlock Indicates the extension parameter Property kAddBarButtonItemInfo
ExtendParameterBlock Indicates the extension parameter Property kAddLeftBarButtonItem
ExtendParameterBlock Indicates the extension parameter Property kAddRightBarButtonItem

UILabel

UILabel+KJCopy UILabel adds the long-press copy function

function type API & Property
Can I copy Property copyable
Remove copy long press gesture Instance kj_removeCopyLongPressGestureRecognizer

UILabel+KJExtension Text position and size

function type API & Property
Set the display position of text content Property customTextAlignment
To obtain the width Instance kj_calculateWidth
To obtain high Instance kj_calculateHeightWithWidth:
Gets the height, specifying the row height Instance kj_calculateHeightWithWidth:OneLineHeight:
Get text size Class kj_calculateLabelSizeWithTitle:font:constrainedToSize:lineBreakMode:

UILabel+KJCreate Creates text quickly

function type API & Property
Quick text creation Class kj_createLabel:

UILabel + KJAttributedString rich text

function type API & Property
Range between lines of text Instance kj_AttributedStringTextLineSpace:
Size of text between Range Instance kj_AttributedStringTextFont:Range:
Text color between Range Instance kj_AttributedStringTextColor:Range:
Range between text size and color Instance kj_AttributedStringTextFont:TextColor:Range:
Text-related properties between Range Instance kj_AttributedStringTextAttributes:Range:
Rich text text size Instance kj_AttributedStringTextFont:Loc:Len:
Rich text color Instance kj_AttributedStringTextColor:Loc:Len:
Rich text text size and color Instance kj_AttributedStringTextFont:TextColor:Loc:Len:
Rich text text-related properties Instance kj_AttributedStringTextAttributes:Loc:Len:

UIImageView

UIImageView+KJBlur (Gaussian blur, Accelerate blur, frosted glass, mask)

function type API & Property
blurred Instance kj_blurImageViewWithBlurType:BlurImage:BlurRadius:

UIImageView+KJLetters Text profile picture, initials profile picture

function type API & Property
Display text image Instance kj_imageViewWithText:LettersInfo:
To view your avatar, click on the full screen Instance kj_headerImageShowScreen
Browse profile picture, background color Instance kj_headerImageShowScreenWithBackground:

UIImage

UIImage+KJQRCode QR code/bar code generator, special note text cannot be Chinese characters

function type API & Property
Converts a string to a bar code Class kj_barCodeImageWithContent:
Generate QR code Class kj_QRCodeImageWithContent:codeImageSize:
Generates a specified color QR code Class kj_QRCodeImageWithContent:codeImageSize:color:
Generating barcode Class kj_barcodeImageWithContent:codeImageSize:
Generates the specified color bar code Class kj_barcodeImageWithContent:codeImageSize:color:
Change image size, bitmap way Instance kj_bitmapChangeImageSize:
Change the inner pixel color of the image Instance kj_changeImagePixelColor:

UIImage+KJURLSize gets the network image size

function type API & Property
Gets the network image size Class kj_imageGetSizeWithURL:
Asynchronous wait to get network image size, semaphore Class kj_imageAsyncGetSizeWithURL:

UIImage+KJScale image size processing

function type API & Property
Scale an image by scale Instance kj_scaleImage:
Scale an image with a fixed width Instance kj_scaleWithFixedWidth:
Scale image at fixed height Instance kj_scaleWithFixedHeight:
Change the size of the picture by proportion Instance kj_cropImageWithAnySize:
Scale down the size of the picture Instance kj_zoomImageWithMaxSize:
Do not pull up the fill image Instance kj_fitImageWithSize:

UIImage+KJPhotoshop

function type API & Property
Gets the average color of the image Instance kj_getImageAverageColor
Obtain grayscale Instance kj_getGrayImage
Change image transparency Instance kj_changeImageAlpha:
Change the image background color Instance kj_changeImageColor:
Modify the line color of the picture Instance kj_imageLinellaeColor:
Set the blend Instance kj_imageBlendMode:TineColor:

UIImage+KJMask mask processing, image Mosaic

function type API & Property
Text watermarking Instance kj_waterText:direction:textColor:font:margin:
Image watermarking Instance kj_waterImage:direction:waterSize:margin:
Watermarking images Instance kj_waterMark:InRect:
Mask image processing Instance kj_maskImage:
Circular images Instance kj_circleImage
Oval picture Instance kj_ellipseImage
Image transparent area click through processing Instance kj_transparentWithPoint:

UIImage+KJJoint image stitching related processing

function type API & Property
Rotate image and mirror processing Instance kj_rotationImageWithOrientation:
Stitch any image vertically and fix the width of the main image Instance kj_moreJointVerticalImage:
Add a random picture horizontally and fix the height of the main picture Instance kj_moreJointLevelImage:
Image multiple synthesis processing Instance kj_imageCompoundWithLoopNums:Orientation:
Add a random picture horizontally and fix the height of the main picture Instance kj_moreAccelerateJointLevelImage:
Photo Mosaic art Instance kj_jointImageWithJointType:Size:Maxw:
Advanced version of picture Mosaic art, to be improved Instance kj_jointImageWithAdvanceJointType:Size:Maxw:Parameter:

UIImage+KJGIF Plays a dynamic image

function type API & Property
Local dynamic graph play Class kj_gifLocalityImageWithName:
Local dynamic figure Class kj_gifImageWithData:
Network diagram Class kj_gifImageWithURL:

UIImage+KJFloodFill is based on the scan line flooding algorithm to obtain the image filled with the same color area

function type API & Property
Fill the image Instance kj_FloodFillImageFromStartPoint:NewColor:Tolerance:UseAntialias:

UIImage+CoreImage CoreImage framework

function type API & Property
Photoshop filter Instance kj_coreImagePhotoshopWithType:Value:
Common methods Instance kj_coreImageCustomWithName:Dicts:
Highlights and shadows Instance kj_coreImageHighlightShadowWithHighlightAmount:ShadowAmount:
Make the image black transparent Instance kj_coreImageBlackMaskToAlpha
Mosaic Instance kj_coreImagePixellateWithCenter:Scale:
Image circle distortion Instance kj_coreImageCircularWrapWithCenter:Radius:Angle:
Annular lens distortion Instance kj_coreImageTorusLensDistortionCenter:Radius:Width:Refraction:
Empty deformation Instance kj_coreImageHoleDistortionCenter:Radius:
Applied perspective correction Instance kj_coreImagePerspectiveCorrectionWithTopLeft:TopRight:BottomRight:BottomLeft:
Perspective transformation Instance kj_coreImagePerspectiveTransformWithTopLeft:TopRight:BottomRight:BottomLeft:
Soft clothing exclusive perspective Instance kj_softFitmentFluoroscopyWithTopLeft:TopRight:BottomRight:BottomLeft:

UIImage+KJCompress provides several system API processing methods

function type API & Property
Compresses the image to the specified size Instance kj_compressTargetByte:
Compresses the image to the specified size Class kj_compressImage:TargetByte:
UIKit way Instance kj_UIKitChangeImageSize:
Quartz 2D Instance kj_QuartzChangeImageSize:
ImageIO Instance kj_ImageIOChangeImageSize:
CoreImage Instance kj_CoreImageChangeImageSize:
Accelerate Instance kj_AccelerateChangeImageSize:

UIImage+KJCapture capture and crop processing

function type API & Property
Current View Screenshot Class kj_captureScreen:
Screenshot of the specified location Class kj_captureScreen:Rect:
Custom quality screenshots, quality quality multiple Class kj_captureScreen:Rect:Quality:
Take the current screen (window screenshot) Class kj_captureScreenWindow
Capture the current screen (rotate according to the direction of the phone) Class kj_captureScreenWindowForInterfaceOrientation
Intercept a long view of the scroll view Class kj_captureScreenWithScrollView:ContentOffset:
Crop out the transparency around the image Class kj_cutImageRoundAlphaZero:
Cut diagram of irregular figure Class kj_anomalyCaptureImageWithView:BezierPath:
Polygon tangent Class kj_polygonCaptureImageWithImageView:PointArray:
Specified area clipping Class kj_cutImageWithImage:Frame:
Quartz 2D implements clipping Class kj_quartzCutImageWithImage:Frame:
Image path clipping, clipping the “outside” part of the path Class kj_captureOuterImage:BezierPath:Rect:
Image path clipping, clipping the “within” part of the path Class kj_captureInnerImage:BezierPath:Rect:

UIImage+KJAccelerate Accelerate frame image processing

function type API & Property
Image rotation Instance kj_rotateInRadians:
blurred Instance kj_blurImageSoft
blurred Instance kj_blurImageLight
blurred Instance kj_blurImageExtraLight
blurred Instance kj_blurImageDark
Specifies color linear blur Instance kj_blurImageWithTintColor:
Linear blur, keeping the transparent area Instance kj_linearBlurryImageBlur:
blurred Instance kj_blurImageWithRadius:Color:MaskImage:
Balanced operation Instance kj_equalizationImage
The erosion of Instance kj_erodeImage
Form expansion/expansion Instance kj_dilateImage
Many times the erosion Instance kj_erodeImageWithIterations:
Form multifold expansion/expansion Instance kj_dilateImageWithIterations:
The gradient Instance kj_gradientImageWithIterations:
Hat operation Instance kj_tophatImageWithIterations:
Black hat operation Instance kj_blackhatImageWithIterations:
Convolution processing Instance kj_convolutionImageWithKernel:
sharpen Instance kj_sharpenImage
sharpen Instance kj_sharpenImageWithIterations:
relief Instance kj_embossImage
gaussian Instance kj_gaussianImage
Edge detection Instance kj_marginImage
Edge detection Instance kj_edgeDetection

UIDevice

UIDevice+KJSystem System-related operations

function type API & Property
The App version number Class & Property appCurrentVersion
The name of the App Class & Property appName
Mobile phone UUID Class & Property deviceID
Get App Icon Class & Property appIcon
Check whether the App supports landscape screen Class & Property supportHorizontalScreen
Gets the launch page image Class & Property launchImage
Cache path of system startup diagram Class & Property launchImageCachePath
Startup diagram Backup file path Class & Property launchImageBackupPath
Generate startup diagram Class kj_launchImageWithPortrait:Dark:
Generate startup diagram Class kj_launchImageWithStoryboard:Portrait:Dark:
Comparison version number Class kj_comparisonVersion:
Obtain the AppStore version and details Class kj_getAppStoreVersionWithAppid:Details:
Jumps to the specified URL Class kj_openURL:
Call the AppStore Class kj_skipToAppStoreWithAppid:
Call safari, the built-in browser Class kj_skipToSafari
Call native Mail Class kj_skipToMail
Whether to switch to the speaker Class kj_changeLoudspeaker:
Save to photo album Class kj_savedPhotosAlbumWithImage:Complete:
System built-in sharing Class kj_shareActivityWithItems:ViewController:Complete:
Switch to the root view controller Class kj_changeRootViewController:Complete:

UIControl

UISegmentedControl+KJCustom

function type API & Property
Solve the problem of modifying background color and text color Instance kj_ensureBackgroundAndTintColor:

UIColor

UIColor+KJExtension Color related extension

function type API & Property
The gradient color Class zj_gradientColorWithColors:GradientType:Size:
Vertical gradient color Instance kj_gradientVerticalToColor:Height:
Horizontal gradient color Instance kj_gradientAcrossToColor:Width:
Generates a gradient image with a border Class kj_colorImageWithColors:locations: size:borderWidth:borderColor:
UIColor turns a hexadecimal string Class kj_hexStringFromColor:
Hexadecimal string to UIColor Class kj_colorWithHexString:
Gets the color of the specified point on the image Class kj_colorAtImage:Point:
Gets the image color for the specified point on the ImageView Class kj_colorAtImageView:Point:

UIColor+KJExtension2 color dependent extension

function type API & Property
Property red
Property green
Property blue
Property alpha
hue Property hue
saturation Property saturation
brightness Property light
Gets the RGBA corresponding to the color Instance kj_colorGetRGBA
Gets the hue saturation and opacity of a color Instance kj_colorGetHSL
Get the average of the colors Class kj_averageColors:

UIButton

UIButton+KJBlock Click event ButtonBlock

function type API & Property
Whether to enable the interval method exchange Protocol kj_openTimeExchangeMethod
Add click Event Instance kj_addAction:
Add events. Multiple enumerations are not supported Instance kj_addAction:forControlEvents:
Click event interval Property timeInterval

UIButton+KJContentLayout (support XIB display)

function type API & Property
Graphic style Property layoutType
Graphic spacing Property padding
Spacing at the edges of the text Property periphery
Graphic style Property kj_ButtonContentLayoutType
Graphic spacing Property kj_Padding
Spacing at the edges of the text Property kj_PaddingInset

UIButton + KJCountDown countdown

function type API & Property
The countdown to the end of the callback Property kButtonCountDownStop
Set the countdown interval and countdown copy Instance kj_startTime:CountDownFormat:
Cancel countdown Instance kj_cancelTimer

UIButton+KJCreate button for quick creation

function type API & Property
Create picture button Class kj_createButton:

UIButton+KJEmitter button particle effect

function type API & Property
Whether to enable particle effects Property openEmitter
Particle, note that the name property does not change Property emitterCell
Set the particle effect Instance kj_buttonSetEmitterImage:OpenEmitter:

UIButton+KJEnlarge Changes the response area of UIButton – enlarges the Button click area

function type API & Property
Set button for extra hot zone Property touchAreaInsets
Expand click field Instance kj_EnlargeEdgeWithTop:right:bottom:left:

UIButton+KJIndicator (system built-in Daisy)

function type API & Property
Button is being submitted Property submitting
Indicator and text spacing Property indicatorSpace
Indicator color Property indicatorType
The submission begins, and the indicator follows the text Instance kj_beginSubmitting:
End to submit Instance kj_endSubmitting
Display indicator Instance kj_showIndicator
Hidden indicator Instance kj_hideIndicator

UICollectionView

UICollectionView+KJTouch to get touch event handling

function type API & Property
Switch on method Property kOpenExchange
Touch inside the move callback Property moveblock

UIBezierPath

UIBezierPath+KJPoints gets the points above the Bezier curve

function type API & Property
Get all points Property points
Gets the text bezier path Class kj_bezierPathWithText:Font:

NSObject

KJGeometry equation related

function type API & Property
Given the lengths from A and B and from C to B, find C perpendicular to AB Class kj_perpendicularLineDotsWithA:B:Len:Positive:
Given the lengths from A and B and from C to B, find C perpendicular to AB Class kj_perpendicularLineDotsWithA:B:Length:
Given four points A, B, C and D, find the intersection point of AB and CD Class kj_linellaeCrosspointWithA:B:C:D:
Find the length of two line segments Class kj_distanceBetweenPointsWithA:B:
Given the points A, B, and C, find the points on the parallel of line AB to line C Class kj_parallelLineDotsWithA:B:C:
Ellipse for point equation Class kj_ovalPointWithRect:Angle:

KJMathEquation mathematical algorithm equation

function type API & Property
Convert radians into angles Class kj_degreeFromRadian:
Convert the Angle to radians Class kj_radianFromDegree:
The radian value of the tangent function, tangent Class kj_radianValueFromTanSideA:sideB:
Gets a new size with a fixed width Class kj_resetFromSize:FixedWidth:
Gets a new size with a fixed height Class kj_resetFromSize:FixedHeight:
A linear equation with one variable, k, b Class kj_mathOnceLinearEquationWithPointA:PointB:
Given y, k, and b, find x Class kj_xValueWithY:LinearEquation:
Given x, k, b, y Class kj_yValueWithX:LinearEquation:

NSObject+KJKVO key value listens for encapsulation, automatically releases

function type API & Property
Kvo listening Instance kj_observeKey:ObserveResultBlock:

NSObject+KJRuntime Runtime lightweight package

function type API & Property
Gets all properties of the object, including the parent class Property propertyTemps
List of instance variables Property ivarTemps
Methods list Property methodTemps
Protocol list to be followed Property protocolTemps
File encapsulation Instance kj_encodeRuntime:
The solution file encapsulation Instance kj_initCoderRuntime:

NSObject+KJSemaphore Lightweight Decoupling tool (signal)

function type API & Property
Send message processing Instance kj_sendSemaphoreWithKey:Message:Parameter:
Receiving message processing Instance kj_receivedSemaphoreBlock:
Code execution time processing Class kj_executeTime:

NSDictionary

NSDictionary+KJExtension

function type API & Property
Whether is empty Property isEmpty
Convert to a Josn string Property jsonString

NSString

NSString+KJExtension String extension attribute

function type API & Property
Whether is empty Property isEmpty
Is converted into a URL Property URL
Get photo Property image
Remove the HTML Property HTMLString
Josn String transfer dictionary Property jsonDict
Generate vertical text Property verticalText
Get text width Instance kj_maxWidthWithFont:Height:Alignment:LinebreakMode:LineSpace:
Get text height Instance kj_maxHeightWithFont:Width:Alignment:LinebreakMode:LineSpace:
Text to picture Instance kj_textBecomeImageWithSize:BackgroundColor:TextAttributes:

NSString+KJChinese Characters related processing

function type API & Property
Chinese characters to Pinyin Property pinYin
Random Chinese characters Class kj_randomCreateChinese:
To find the data Instance kj_searchArray:
Alphabetical order Instance kj_letterSortArray:

NSString+KJPredicate tool

function type API & Property
Filtering the blank space Instance kj_filterSpace
Verify the digital Instance kj_validateNumber
Whether there are special characters Instance kj_validateHaveSpecialCharacter
Filtering special characters Instance kj_removeSpecialCharacter:
Verify your phone number Instance kj_validateMobileNumber
Verify mailbox format Instance kj_validateEmail
Verify ID card Instance kj_validateIDCardNumber
Verify bank card Instance kj_validateBankCardNumber

NSString+KJSecurity encryption decryption tool, chain processing

function type API & Property
To generate the key Instance kj_createKey
To generate the token Instance kj_createToken
RSA Public Key Encryption Instance kj_rsaEncryptPublicKey
RSA Public Key Decryption Instance kj_rsaDecryptPublicKey
RSA private key encryption Instance kj_rsaEncryptPrivateKey
Decrypt the RSA private key Instance kj_rsaDecryptPrivateKey
AES encryption Instance kj_aesEncryptKey
AES decryption Instance kj_aesDecryptKey
Base64 encoding Instance kj_base64EncodedString
Base64 decoding Instance kj_base64DecodingString

NSTimer

NSTimer+KJExtension

function type API & Property
Current thread timer Class kj_scheduledTimerWithTimeInterval:Repeats:Block:
The current thread Class kj_scheduledTimerWithTimeInterval:Repeats:Block:RunLoopMode:
Thread timer Class kj_timerWithTimeInterval:Repeats:Block:
immediately Instance kj_immediatelyTimer
suspended Instance kj_pauseTimer
Restart timer Instance kj_resumeTimer
Delay to perform Instance kj_resumeTimerAfterTimeInterval:
Release timer Class kj_invalidateTimer:

NSArray

NSArray+KJPredicate tool

function type API & Property
Compare two arrays, remove the same elements and merge them Instance kj_mergeArrayAndDelEqualObjWithOtherArray:
Filter array Instance kj_filtrationDatasWithPredicateBlock:
Remove the data from the array that contains the target array Instance kj_delEqualDatasWithTargetTemps:
Order a property in ascending or descending order Instance kj_sortDescriptorWithKey:Ascending:
Sorted by ascending or descending order of certain attributes Instance kj_sortDescriptorWithKeys:Ascendings:
Retrieves the element in key that matches value Instance kj_takeOutDatasWithKey:Value:
String comparison operator Instance kj_takeOutDatasWithOperator:Key:Value:

NSArray+KJExtension deals with the elements in the array

function type API & Property
Whether is empty Property isEmpty
Filter data Instance kj_detectArray:
Multidimensional arrays filter data Instance kj_detectManyDimensionArray:
To find the data Instance kj_searchObject:
mapping Instance kj_mapArray:
Insert data into the destination location Instance kj_insertObject:
Array computation intersection Instance kj_arrayIntersectionWithOtherArray:
The array calculates the difference set Instance kj_arrayMinusWithOtherArray:
Randomly shuffled array Instance kj_disorganizeArray
Removes identical elements from an array Instance kj_delArrayEquelObj
Generates a set of random numbers that are not repeated Instance kj_noRepeatRandomArrayWithMinNum:maxNum:count:
Binary search Instance kj_binarySearchTarget:
Bubble sort Instance kj_bubbleSort
Insertion sort Instance kj_insertSort
Selection sort Instance kj_selectionSort

This is really the hand all copy paste pain, bosses point a star to encourage –

The Demo addressKJEmitterView, graphic introductionDoraemon tool library introduction

Note: Some of the functions and Demo used in this article are from the tripartite library **KJEmitterView**, if there is a need for friends can bepod 'KJEmitterView'Introduction to

This is the end of the functional introduction, there are relevant to add, writing articles is not easy, also please click **Little stars* * portal