超实用开发加速工具收集,分享给你吧~(二)

简介: 超实用开发加速工具收集,分享给你吧~

UITextView+KJLimitCounter  限制处理

功能 类型 方法 & 函数
限制字数 Property limitCount
限制区域右边距 Property limitMargin
限制区域高度 Property limitHeight
统计限制字数Label Property limitLabel

UITextField

UITextField+KJExtension  输入框扩展,快速设置账号密码框

功能 类型 方法 & 函数
设置底部边框线条颜色 Property bottomLineColor
占位placeholder颜色 Property placeholderColor
占位文字字体大小 Property placeholderFontSize
最大长度 Property maxLength
明文暗文切换 Property securePasswords
达到最大字符长度 Property kMaxLengthBolck
文本编辑时刻回调 Property kTextEditingChangedBolck
设置左边视图,类似账号密码标题 Instance kj_leftView:
设置右边视图,类似小圆叉 Instance kj_rightViewTapBlock:ImageName:Width:Padding:

UITabBar

UITabBar+KJBadge  显示小红点

功能 类型 方法 & 函数
当前的TabBar个数 Protocol kj_tabBarCount:
显示小红点 Instance kj_showRedBadgeOnItemIndex:
隐藏小红点 Instance kj_hideRedBadgeOnItemIndex:

UISlider

KJColorSlider  渐变色滑块

功能 类型 方法 & 函数
颜色数组 Property colors
每个颜色对应的位置信息 Property locations
颜色的高度 Property colorHeight
边框宽度 Property borderWidth
边框颜色 Property borderColor
回调处理时间 Property timeSpan
当前进度,用于外界kvo Property progress
移动回调处理 Property kValueChangeBlock
移动结束回调处理 Property kMoveEndBlock
重新设置UI Instance kj_setUI

UISlider+KJTapValue  滑杆点击改值

功能 类型 方法 & 函数
是否开启滑杆点击修改值 Property kTapValue

UIResponder

UIResponder+KJAdapt   简单的屏幕比例适配

功能 类型 方法 & 函数
设计图机型 Protocol kj_adaptModelType:
水平比例适配 Function KJAdaptScaleLevel
竖直比例适配 Function KJAdaptScaleVertical
适配CGpoint Function KJAdaptPointMake
适配CGSize Function KJAdaptSizeMake
适配CGRect Function KJAdaptRectMake
适配UIEdgeInsets Function KJAdaptEdgeInsetsMake

UINavigationBar

UINavigationBar+KJExtension

功能 类型 方法 & 函数
设置navigationBar背景颜色 Property kj_BackgroundColor
设置基础的透明度 Property kj_Alpha
重置 Instance kj_reset

UILabel

UILabel+KJCopy   UILabel添加长按复制功能

功能 类型 方法 & 函数
是否可以拷贝 Property copyable
移除拷贝长按手势 Instance kj_removeCopyLongPressGestureRecognizer

UILabel+KJExtension   文本位置和尺寸获取

功能 类型 方法 & 函数
设置文字内容显示位置 Property customTextAlignment
获取宽度 Instance kj_calculateWidth
获取高度 Instance kj_calculateHeightWithWidth:
获取高度,指定行高 Instance kj_calculateHeightWithWidth:OneLineHeight:

UILabel+KJAttributedString   富文本

功能 类型 方法 & 函数
Range之间文字行间距 Instance kj_AttributedStringTextLineSpace:
Range之间文字大小 Instance kj_AttributedStringTextFont:Range:
Range之间文字颜色 Instance kj_AttributedStringTextColor:Range:
Range之间文字大小和颜色 Instance kj_AttributedStringTextFont:TextColor:Range:
Range之间文字相关属性 Instance kj_AttributedStringTextAttributes:Range:
富文本文字大小 Instance kj_AttributedStringTextFont:Loc:Len:
富文本文字颜色 Instance kj_AttributedStringTextColor:Loc:Len:
富文本文字大小和颜色 Instance kj_AttributedStringTextFont:TextColor:Loc:Len:
富文本文字相关属性 Instance kj_AttributedStringTextAttributes:Loc:Len:

UIImageView

UIImageView+KJBlur   模糊处理(高斯模糊、Accelerate模糊、毛玻璃、蒙版)

功能 类型 方法 & 函数
模糊处理 Instance kj_blurImageViewWithBlurType:BlurImage:BlurRadius:

UIImageView+KJLetters  文字头像,首字母缩略头像

功能 类型 方法 & 函数
显示文字图片 Instance kj_imageViewWithText:LettersInfo:
浏览头像,点击全屏展示 Instance kj_headerImageShowScreen
浏览头像,背景颜色 Instance kj_headerImageShowScreenWithBackground:

UIImage

UIImage+KJQRCode  二维码/条形码生成器,特别备注文字不能是中文汉字

功能 类型 方法 & 函数
将字符串转成条形码 Class kj_barCodeImageWithContent:
生成二维码 Class kj_QRCodeImageWithContent:codeImageSize:
生成指定颜色二维码 Class kj_QRCodeImageWithContent:codeImageSize:color:
生成条形码 Class kj_barcodeImageWithContent:codeImageSize:
生成指定颜色条形码 Class kj_barcodeImageWithContent:codeImageSize:color:
改变图片尺寸,bitmap方式 Instance kj_bitmapChangeImageSize:
改变图片内部像素颜色 Instance kj_changeImagePixelColor:

UIImage+KJURLSize  获取网络图片尺寸

功能 类型 方法 & 函数
获取网络图片尺寸 Class kj_imageGetSizeWithURL:
异步等待获取网络图片大小,信号量 Class kj_imageAsyncGetSizeWithURL:

UIImage+KJScale  图片尺寸处理

功能 类型 方法 & 函数
通过比例来缩放图片 Instance kj_scaleImage:
以固定宽度缩放图像 Instance kj_scaleWithFixedWidth:
以固定高度缩放图像 Instance kj_scaleWithFixedHeight:
等比改变图片尺寸 Instance kj_cropImageWithAnySize:
等比缩小图片尺寸 Instance kj_zoomImageWithMaxSize:
不拉升填充图片 Instance kj_fitImageWithSize:

UIImage+KJPhotoshop

功能 类型 方法 & 函数
获取图片平均颜色 Instance kj_getImageAverageColor
获得灰度图 Instance kj_getGrayImage
改变图片透明度 Instance kj_changeImageAlpha:
改变图片背景颜色 Instance kj_changeImageColor:
修改图片线条颜色 Instance kj_imageLinellaeColor:
图层混合 Instance kj_imageBlendMode:TineColor:

UIImage+KJMask   蒙版处理,图片拼接

功能 类型 方法 & 函数
文字水印 Instance kj_waterText:direction:textColor:font:margin:
图片水印 Instance kj_waterImage:direction:waterSize:margin:
图片添加水印 Instance kj_waterMark:InRect:
蒙版图片处理 Instance kj_maskImage:
圆形图片 Instance kj_circleImage
椭圆形图片 Instance kj_ellipseImage
图片透明区域点击穿透处理 Instance kj_transparentWithPoint:

UIImage+KJJoint   图片拼接相关处理

功能 类型 方法 & 函数
旋转图片和镜像处理 Instance kj_rotationImageWithOrientation:
竖直方向拼接随意张图片,固定主图的宽度 Instance kj_moreJointVerticalImage:
水平方向拼接随意张图片,固定主图的高度 Instance kj_moreJointLevelImage:
图片多次合成处理 Instance kj_imageCompoundWithLoopNums:Orientation:
水平方向拼接随意张图片,固定主图的高度 Instance kj_moreAccelerateJointLevelImage:
图片拼接艺术 Instance kj_jointImageWithJointType:Size:Maxw:

UIImage+KJGIF   播放动态图

功能 类型 方法 & 函数
本地动态图播放 Class kj_gifLocalityImageWithName:
本地动图 Class kj_gifImageWithData:
网络动图 Class kj_gifImageWithURL:

UIImage+CoreImage   CoreImage框架整理

功能 类型 方法 & 函数
Photoshop滤镜 Instance kj_coreImagePhotoshopWithType:Value:
通用方法 Instance kj_coreImageCustomWithName:Dicts:
高光和阴影 Instance kj_coreImageHighlightShadowWithHighlightAmount:ShadowAmount:
将图片黑色变透明 Instance kj_coreImageBlackMaskToAlpha
马赛克 Instance kj_coreImagePixellateWithCenter:Scale:
图片圆形变形 Instance kj_coreImageCircularWrapWithCenter:Radius:Angle:
环形透镜畸变 Instance kj_coreImageTorusLensDistortionCenter:Radius:Width:Refraction:
空变形 Instance kj_coreImageHoleDistortionCenter:Radius:

UIImage+KJCompress  图片压缩处理,提供几种系统API的处理方式

功能 类型 方法 & 函数
压缩图片到指定大小 Instance kj_compressTargetByte:
压缩图片到指定大小 Class kj_compressImage:TargetByte:
UIKit方式 Instance kj_UIKitChangeImageSize:
Quartz 2D Instance kj_QuartzChangeImageSize:
ImageIO Instance kj_ImageIOChangeImageSize:
CoreImage Instance kj_CoreImageChangeImageSize:
Accelerate Instance kj_AccelerateChangeImageSize:

UIImage+KJCapture  截图和裁剪处理

功能 类型 方法 & 函数
当前视图截图 Class kj_captureScreen:
指定位置屏幕截图 Class kj_captureScreen:Rect:
自定义质量的截图,quality质量倍数 Class kj_captureScreen:Rect:Quality:
截取当前屏幕(窗口截图) Class kj_captureScreenWindow
截取当前屏幕(根据手机方向旋转) Class kj_captureScreenWindowForInterfaceOrientation
截取滚动视图的长图 Class kj_captureScreenWithScrollView:ContentOffset:
裁剪掉图片周围的透明部分 Class kj_cutImageRoundAlphaZero:
不规则图形切图 Class kj_anomalyCaptureImageWithView:BezierPath:
多边形切图 Class kj_polygonCaptureImageWithImageView:PointArray:
指定区域裁剪 Class kj_cutImageWithImage:Frame:
quartz 2d 实现裁剪 Class kj_quartzCutImageWithImage:Frame:
图片路径裁剪,裁剪路径 "以外" 部分 Class kj_captureOuterImage:BezierPath:Rect:
图片路径裁剪,裁剪路径 "以内" 部分 Class kj_captureInnerImage:BezierPath:Rect:

UIImage+KJAccelerate  Accelerate 框架的图片处理

功能 类型 方法 & 函数
图片旋转 Instance kj_rotateInRadians:
模糊处理 Instance kj_blurImageSoft
模糊处理 Instance kj_blurImageLight
模糊处理 Instance kj_blurImageExtraLight
模糊处理 Instance kj_blurImageDark
指定颜色线性模糊 Instance kj_blurImageWithTintColor:
线性模糊,保留透明区域 Instance kj_linearBlurryImageBlur:
模糊处理 Instance kj_blurImageWithRadius:Color:MaskImage:
均衡运算 Instance kj_equalizationImage
侵蚀 Instance kj_erodeImage
形态膨胀/扩张 Instance kj_dilateImage
多倍侵蚀 Instance kj_erodeImageWithIterations:
形态多倍膨胀/扩张 Instance kj_dilateImageWithIterations:
梯度 Instance kj_gradientImageWithIterations:
顶帽运算 Instance kj_tophatImageWithIterations:
黑帽运算 Instance kj_blackhatImageWithIterations:
卷积处理 Instance kj_convolutionImageWithKernel:
锐化 Instance kj_sharpenImage
锐化 Instance kj_sharpenImageWithIterations:
浮雕 Instance kj_embossImage
高斯 Instance kj_gaussianImage
边缘检测 Instance kj_marginImage
边缘检测 Instance kj_edgeDetection

UIDevice

UIDevice+KJSystem  系统相关的操作

功能 类型 方法 & 函数
App版本号 Class appCurrentVersion
App名称 Class appName
手机UUID Class deviceID
获取App图标 Class appIcon
判断App是否支持横屏 Class supportHorizontalScreen
获取启动页图片 Class launchImage
系统启动图缓存路径 Class launchImageCachePath
启动图备份文件路径 Class launchImageBackupPath
生成启动图 Class kj_launchImageWithPortrait:Dark:
生成启动图 Class kj_launchImageWithStoryboard:Portrait:Dark:
对比版本号 Class kj_comparisonVersion:
获取AppStore版本号和详情信息 Class kj_getAppStoreVersionWithAppid:Details:
跳转到指定URL Class kj_openURL:
调用AppStore Class kj_skipToAppStoreWithAppid:
调用自带浏览器safari Class kj_skipToSafari
调用自带Mail Class kj_skipToMail
是否切换为扬声器 Class kj_changeLoudspeaker:
保存到相册 Class kj_savedPhotosAlbumWithImage:Complete:
系统自带分享 Class kj_shareActivityWithItems:ViewController:Complete:
切换根视图控制器 Class kj_changeRootViewController:Complete:

UIColor

UIColor+KJExtension  颜色相关扩展

功能 类型 方法 & 函数
渐变颜色 Class zj_gradientColorWithColors:GradientType:Size:
竖直渐变颜色 Instance kj_gradientVerticalToColor:Height:
横向渐变颜色 Instance kj_gradientAcrossToColor:Width:
UIColor转16进制字符串 Class kj_hexStringFromColor:
16进制字符串转UIColor Class kj_colorWithHexString:
获取图片上指定点的颜色 Class kj_colorAtImage:Point:
获取ImageView上指定点的图片颜色 Class kj_colorAtImageView:Point:

UIColor+KJExtension2  颜色相关扩展

功能 类型 方法 & 函数
红 Property red
绿 Property green
蓝 Property blue
透明度 Property alpha
色相 Property hue
饱和度 Property saturation
亮度 Property light


相关文章
|
8天前
|
域名解析 人工智能 Linux
|
18天前
|
Linux Go 开发工具
手机上跑 DeepSeek 智能体:开源安卓客户端 DSH Go 安装与使用指南
DSH Go 是一款开源安卓客户端,将 DeepSeek Harness 智能体引擎装进手机:免 Root、免 Termux,一键安装即用;支持本机运行(内置 Ubuntu+Node.js)或远程接管电脑会话;具备插话打断、过程折叠、屏幕操控、端到端加密分享等特色功能,真正实现智能体“口袋化”。
16813 62
|
16天前
|
人工智能
Google 提示「所在地区不可用」?进不去 Antigravity 或 Gemini,先查账号这个设置
进不去 Antigravity 或 Gemini,提示所在地区不可用?三步查清 Google 账号关联地区、官方更正表单理由选法与改区注意事项。
Google 提示「所在地区不可用」?进不去 Antigravity 或 Gemini,先查账号这个设置
|
2天前
|
人工智能 安全 网络安全
|
5天前
|
云安全 数据采集 人工智能
|
6天前
|
Linux API iOS开发
【DSH】DeepSeek Harness新手保姆教程(下载+安装+配置+使用,2026最新实测)
DeepSeek Harness(dsh)是 DeepSeek AI 开源的智能体框架,秉持“一切皆插件”理念,支持读文件、改代码、执行命令、处理表格等自动化任务;免费开源,兼容 Win/macOS,需配 API 密钥使用。(239字)
1210 2
|
13天前
|
人工智能 开发工具 开发者
2026最新codex下载安装保姆级使用教程(下载+安装+登录+使用,含所有历史版本)
Codex 是 OpenAI 推出的开源 AI 编程智能体,跑在本地终端和桌面客户端里,能读懂整个代码仓库,一句自然语言就能让它改代码、执行命令、跑测试、修 Bug,支持 Windows、macOS、Linux 三大平台。本文把 Codex下载、安装、登录、汉化、基础使用一次讲全,并整理了国内用户最常踩的坑,跟着做 10 分钟就能跑起来。
2289 7
|
18天前
|
弹性计算 人工智能 API
Codex超详细入门指南(下载·安装·登录·上手,全版本覆盖,2026最新版)
建议收藏本教程,2026 全年各版本更新随时回来查阅。如果你在搭建过程中遇到任何问题,欢迎结合 阿里云工单系统 提交技术支持请求,或在 阿里云开发者社区 搜索 Codex 相关话题交流。 祝你编码愉快,效率翻倍!
3782 22
|
19天前
|
Linux API iOS开发
【DSH】DeepSeek Harness新手保姆教程(下载+安装+配置+使用,2026最新实测)
DeepSeek Harness(dsh)是DeepSeek AI开源的智能体框架,秉持“一切皆插件”理念,支持读文件、改代码、跑命令、处理表格、联网搜索等操作。免费开源,兼容Windows/macOS/Linux,提供桌面端与网页端,可灵活安装插件扩展能力。