CIFilterImage provides UI that can be easily filter images.
This is wrapper of CIFilter.
Here are some style of demos using CIFilterImage
.
White Theme | Black Theme |
---|---|
// model: Pintarest
Open CIFilterImage.xcodeproj
and run CIFilterImage-Example
.
// Create CIFilterViewController
let vc = CIFilterViewController()
vc.image = UIImage(named: "sample")
// customize color
vc.backgroundColor = .white
vc.textColor = .black
// set delegate
vc.delegate = self
extension ViewController: CIFilterViewControllerDelegate {
// Called when Done Button Tapped
func didFinish(_ image: UIImage) {
print("image", image)
}
// Called when Cancel Button Tapped
func didCancel() {
print("did Cancel")
}
}
- iOS 11.4+
- Xcode 10.2+
- Swift 5.0+
CIFilterImage is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'CIFilterImage'
You can integrate via Carthage, too.
Add the following line to your Cartfile
:
github "yokurin/CIFilterImage"
and run carthage update
Tsubasa Hayashi
- Email: yoku.rin.99@gmail.com
- Github
CIFilterImage is available under the MIT license. See the LICENSE file for more info.