Giter VIP home page Giter VIP logo

tipper's Introduction

Tipper

Prework for iOS (Swift) for Designers

Tipper is a tip calculator application for iOS.

Submitted by: Megs Fulton

Time spent: 30 hours spent in total

User Stories

The following required functionality is complete:

  • User can enter a bill amount, choose a tip percentage, and see the tip and total values.

The following optional features are implemented:

  • UI animations
  • Making sure the keyboard is always visible and the bill amount is always the first responder. This way the user doesn't have to tap anywhere to use this app. Just launch the app and start typing.

The following additional features are implemented:

  • The screen brightness is detected on launch to display a light or dark UI depending on the light level of the environment
  • Manual changes in screen brightness are detected and the UI color adjusts accordingly
  • Two finger swipe up to change the UI to be light. Two finger swipe down to change the UI to be dark
  • Ability to split the bill between 1-4 people
  • Custom Keyboard
  • Appending “$” to the beginning of the bill amount
  • Disabling "0" or "." from being the first entry in the bill field

Video Walkthrough

Here's a walkthrough of implemented user stories:

Video Walkthrough

GIF created with LiceCap. Video created with Reflector.

Notes

Changes in Screen Brightness Detecting changes in screen brightness to change the UI colors was particularly challenging because it required implementing NSNotifications, which seemed straightforward at first. However, most of the documentation was written in Objective-C and or Swift 2.0. I also wanted the user to be able to quickly change the color of the UI through a swipe gesture. This took quite a bit of trial and error with different methods of detecting gestures on the view control, I eventually found a solution that was simple and straightforward.

Custom Keyboard There are a number of tutorials on how to create a system wide custom keyboard and I started by trying to follow one that used an XIB in a separate view class. I soon found it to be unnecessarily complex for my purposes given that my design had the keypad persist regardless of whether or not the billField was active. I ended up using the core components from the XIB tutorial and moving them into my main view controller where I had to modify the code to not use the Keyboard Delegate and disable the bill field so that the system keypad wouldn’t be called on touch.

Appending $ to the beginning of the bill field I thought this would be a fairly straightforward detail to add but it required quite a bit of management of the billField string by detecting the length of the string and appending or removing the $ depending on whether or not a number was entered in the field.

License

Copyright [2017] [Megs Fulton]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

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.