Swift开源-Sharaku:类似 Instagram 图片滤镜库及示例
Dawn5609
8年前
<p><img src="https://simg.open-open.com/show/b9f6fa062ef5a86da90bff3b33265fa5.png"></p> <h2>Sharaku</h2> <h2>Usage</h2> <h3>How to present SHViewController</h3> <pre> <code class="language-swift">let imageToBeFiltered = UIImage(named: "targetImage") let vc = SHViewController(image: imageToBeFiltered) vc.delegate = self self.present(vc, animated:true, completion: nil)</code></pre> <h3>SHViewControllerDelegate methods</h3> <pre> <code class="language-swift">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. } }</code></pre> <h2>Example</h2> <p>To run the example project, clone the repo, and run pod install from the Example directory first.</p> <h2>Demo video</h2> <p><img src="https://simg.open-open.com/show/9b932cd8b8fab0e0b2df64d84264423b.gif"></p> <h2>Requirements</h2> <ul> <li>Swift3</li> <li>iOS 8.3+</li> </ul> <h2>Installation</h2> <p>Sharaku is available through <a href="/misc/goto?guid=4958869288453138992" rel="nofollow,noindex">CocoaPods</a> . To install it, simply add the following line to your Podfile:</p> <pre> <code class="language-swift">pod "Sharaku"</code></pre> <h3>Install manually</h3> <p>It requires a few things. Please follow thesteps.</p> <h2>Author</h2> <p>makomori, <a href="/misc/goto?guid=4959734217348509390" rel="nofollow,noindex">makomori26@gmail.com</a></p> <h2>License</h2> <p>Sharaku is available under the MIT license. See the LICENSE file for more info.</p> <p> </p> <p> </p>