| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
MultiImageCropping is an open-source project that uses pagination to achieve multi-image cropping. It is suitable for scenarios where users publish multi-image posts, blog posts, or short videos. It guides users to crop multiple selected images to a specified aspect ratio. By default, the central area of the image is cropped and can be adjusted by moving it, making multi-image short videos more standardized and beautiful.
The MultiImageCropping SDK for iOS is available through CocoaPods.
First, install CocoaPods if you haven't already:
brew install cocoapods
pod setupAdd to your Podfile:
$iOSVersion = '11.0'
platform :ios, $iOSVersion
use_frameworks!
target 'YourProjectName' do
pod 'MultiImageCropping' # Full version with all features
endDrag the Classes folder into your project. For Objective-C projects, bridging is required.
MicMultiImageCroppingControllerDelegate provides the following callbacks:
let images: [UIImage] = [...]
let cropConfig = MICCropConfiguration()
cropConfig.aspectRatioType = .ratio_1x1
let cropVC = MicMultiImageCroppingViewController(originalImgs: images, micCropConfiguration: cropConfig) { croppedImages in
print("Cropping completed: \(croppedImages.count) images")
}
navigationController?.pushViewController(cropVC, animated: true)This library is licensed under the MIT License.
MultiImageCropping 是一个通过分页处理来实现多图裁剪的开源项目,适用于发布多图帖子或博文或多图短视频的场景,实现引导用户将其选取的多张图片裁剪为规定比例的尺寸,默认裁剪图片中央区域,可移动调整中央区域,使多图短视频更加规范和美观。
MultiImageCropping SDK for iOS 可通过 CocoaPods 安装。
首先,如果您还没有安装 CocoaPods,请先安装:
brew install cocoapods
pod setup在 Podfile 中添加:
$iOSVersion = '11.0'
platform :ios, $iOSVersion
use_frameworks!
target 'YourProjectName' do
pod 'MultiImageCropping' # 包含所有功能的完整版本
end将 Classes 文件夹拽入项目中,OC 项目还需要桥接。
MicMultiImageCroppingControllerDelegate 提供以下回调:
let images: [UIImage] = [...]
let cropConfig = MICCropConfiguration()
cropConfig.aspectRatioType = .ratio_1x1
let cropVC = MicMultiImageCroppingViewController(originalImgs: images, micCropConfiguration: cropConfig) { croppedImages in
print("裁剪完成: \(croppedImages.count) 张图片")
}
navigationController?.pushViewController(cropVC, animated: true)本项目基于 MIT License 开源协议。
| Back | FazBrowse Home | New Git URL |