概要
JBCroppableView is a subclass of UIView built with UIKit and CoreGraphics that adds n points on an UIImageView allowing to modify them by drag & drop to trim the extra space of an image.
Web・アプリ開発できること
- Add an NSArray of specific CGPoints to a UIImageView. * Add a specific number of points. * Drag&Drop of the points. * Crops the UIImage in a UIImageView. * Respects aspect ratio. * ARC(Automatic Reference Counting) support.
計測したスター増加
- 24時間
- 0
- 7日間
- 0
- 15日間
- 0
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルJBCroppableImageView
JBCroppableImageView is a subclass of UIImageView built with UIKit and CoreGraphics that adds n points on an image allowing to modify them by drag & drop to trim the extra space of an image.
Features
- Add an NSArray of specific CGPoints to a UIImageView. * Add a specific number of points. * Drag&Drop of the points. * Crops the UIImage in a UIImageView. * Respects aspect ratio. * ARC(Automatic Reference Counting) support.
Installation
- Drag the JBCroppableImageView/JBCroppableLayer files into your project. * Add the CoreGraphics framework to your project.
Usage (see example Xcode project in /TestCroping)
to set up, initialize how you would a reular UIImageView:
-JBCroppableImageView *cropView = [[JBCroppableImageView alloc]
initWithImage:[UIImage imageNamed:”demo”]];
it will be initialized with four crop points. To add or subtract the number of points:
[cropView addPoint];
[cropView removePoint];
to crop the imageView to the requested shape or to revert back to uncropped state:
[cropView crop];
[cropView reverseCrop];
to retrieve the cropped image:
[cropView getCroppedImage];
[cropView getCroppedImageWithTransparentBorder:YES];
*the image property of JBCroppableImageView remains as the original image
Demo

Credit Javier Berlana, Mobile One2One
関連プロジェクトを探す
読み込み中…