Giter Site home page Giter Site logo

project13-100days-instafilter's Introduction

Project 13 (Instafilter)

This is my solution to the Instafilter project (project 13) in the 100 Days Of SwiftUI tutorial created by Paul Hudson (@twostraws). This was an introduction to Core Image and gave us a taste of what's possible with this very powerful (but very old) API. The project led us through the creation of useful SwiftUI-friendly objects that wrap image picking and saving.

Implemented challenge 1 by adding a state variable to show an elert. The condition is set to true in the save function if the guard statement indicates that the image has not been set.

Challenge 2 was to set the button label to the name of the selected filter. Setting up the action sheet buttons and their action closures led to refactoring the button creation into a function that takes an index and uses it to retrieve the filter and label from a static tuple array that I added to the content view.

For challenge 3, separate sliders (with their own apropriate ranges) were added to control radius and scale settings. Each slider has its own state variable and a custom binding to enable changes to be reflected immediately in the view. Finally, the sliders are only displayed when the setting is supported by the current filter and updates to the state occur inside a default animation to make the transitions more pleasing.

project13-100days-instafilter's People

Contributors

bgilmour avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.