Swift開源-Sharaku:類似 Instagram 圖片濾鏡庫及示例
Sharaku
Usage
How to present SHViewController
let imageToBeFiltered = UIImage(named: "targetImage")
let vc = SHViewController(image: imageToBeFiltered)
vc.delegate = self
self.present(vc, animated:true, completion: nil)
SHViewControllerDelegate methods
extension ViewController: SHViewControllerDelegate {
func shViewControllerImageDidFilter(image: UIImage) {
// Filtered image will be returned here.
}
func shViewControllerDidCancel() {
// This will be called when you cancel filtering the image.
}
}
Example
To run the example project, clone the repo, and run pod install from the Example directory first.
Demo video
Requirements
- Swift3
- iOS 8.3+
Installation
Sharaku is available through CocoaPods . To install it, simply add the following line to your Podfile:
pod "Sharaku"
Install manually
It requires a few things. Please follow thesteps.
Author
makomori, makomori26@gmail.com
License
Sharaku is available under the MIT license. See the LICENSE file for more info.
本文由用戶 Dawn5609 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!