Swift开源-Sharaku:类似 Instagram 图片滤镜库及示例
<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>
本文由用户 Dawn5609 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
转载本站原创文章,请注明出处,并保留原始链接、图片水印。
本站是一个以用户分享为主的开源技术平台,欢迎各类分享!