Skip to content

SwiftCommon project includes something that can be reused in the future.

Notifications You must be signed in to change notification settings

jiangzhenjie/SwiftCommon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwiftCommon

SwiftCommon project includes something that can be reused in the future.

ViewControllers

Usage

It's easy to use this cropper, you implement the protocol SCImageCropperDelegate first and then push or present the cropper view controller.

Implement the SCImageCropperDelegate to handle the results:

protocol SCImageCropperDelegate {
	func imageCropper(cropper: SCImageCropperViewController, didFinishCroppedWithImage resultImage: UIImage)
	func imageCropperDidCancel(cropper: SCImageCropperViewController)
}

Push or present the cropper view controller after getting a image:

let cropperVC = SCImageCropperViewController(image: image, cropSize: CGSize(width: self.view.frame.size.width, height: self.view.frame.size.width))
cropperVC.delegate = self
self.navigationController?.pushViewController(cropperVC, animated: true)

Views

Utilities

About

SwiftCommon project includes something that can be reused in the future.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages