A tip calculator for iOS (in Swift) and Android

Overview

Round & Split

Build Status

I needed a tip calculator, so I wrote one.

I always round my tips, and when I dine out with a friend, I email them reminders that I owe them money or vice versa. I was looking for a tip calculator that could do both, but there wasn't any. Plus, most tip calculators out there have a lot of features that I don't need.

So I decided to make one. Or two in fact – I've made an iOS version and an Android version, because I happen to know programming on both platforms.

You can download the iOS app on the App Store for $0.99. It's a free app on Google Play.

I've also made this an open source project. You are welcome to build the app on your own from the source code. The only difference is that the source code here does not include the app icons made by a professional icon designer.

Features

  • Calculate tip at three most common rates in the United States: 15%, 18%, and 20%.
  • Always give you a rounded total.
  • Send email reminder with pre-populated subject lines.

On Rounding

When Round & Split rounds the total for you, the rounding can go up or down. Which direction it goes depends on the effective rate of the tip. The rate that is closest to your chosen rate wins.

For example, if the charged amount is $37.14, and you want to tip at 18%, the tip would be $6.69 (37.14 × 18% = 6.69) and the total $43.83, which is a bit unwieldy for a total. If we round the total down to $43.00, the tip becomes $5.86, which translate to an effective rate of 15.8% (5.86/37.14 = 0.158). On the other hand, if we round it up to $44.00, the tip becomes $6.86, and the effective rate 18.5% (6.86/37.14 = 0.185). 18.5% is closer to 18%, and so we use $6.86 as the tip and $44.00 as the total. The point is that I want neither overtipping nor undertipping too much.

How to Build the App on Your Own

iOS

Make sure you have the latest version of Xcode installed. At the time of writing, that is Xcode 8.3.2 running on macOS 10.12.4 or higher.

To build Round & Split from source code, follow the steps below:

  1. Run ./setup.sh in your cloned repo directory. This fetches the Fira Sans fonts used by the app.
  2. In ./iOS/RoundAndSplit, open RoundAndSplit.xcodeproj with Xcode.
  3. Use Product > Build.

This allows you to run the app in an iOS Simulator. To upload the built app to your iOS device, you need to be a member of Apple's iOS Developer Program.

Android

Make sure you have the latest Android Studio installed and $ANDROID_HOME properly set. Once you have cloned the repo, go to ./Android/RoundAndSplit and run:

./gradlew clean build

The build .apk file will be at:

./Android/RoundAndSplit/app/build/outputs/apk/app-debug.apk

Then you can just upload the app to your connected device with:

adb install -r app-debug.apk

This, of course, assumes you have enabled the developer mode on your Android device.

I haven't tried this on Linux or Windows. On Windows you may have to use gradlew.bat to build the app.

Contribution Policy

This is an open source project, but I also sell a paid version on the App Store. If you make a pull request, I'll ask you to allow me to use your code in the paid app without compensation. Your contribution will be acknowledged.

Acknowledgments

App icon designed by OneToad.

User interface designed by the Smoking Hare.

The iOS version of this app uses the Fira Sans typeface from Mozilla: https://github.com/mozilla/Fira.

Copyright and License

The source code is released under the MIT License (MIT).

Copyright (c) 2014-2019 Lukhnos Liu.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

You might also like...
iOS calculator app made without storyboard.
iOS calculator app made without storyboard.

Calculator app Standart iOS calculator app written without storyboard - elements placed only by using code. FUN FACT - you can download it and install

Bmi calculator app (iOS)
Bmi calculator app (iOS)

BMI Calculator Our Goal The goal of this tutorial is to learn more about Optionals, solidify your understanding of the MVC design pattern and to intro

A clone of the built-in iOS Calculator APP for iPadOS, using SwiftUI
A clone of the built-in iOS Calculator APP for iPadOS, using SwiftUI

A clone of the built-in iOS Calculator APP for iPadOS, using SwiftUI Yes, it looks exactly the same as the iOS built-in Calculator The UI is implement

A basic discount calculator app Using Swift
A basic discount calculator app Using Swift

DiscountCalcuator This is a basic discount calculator app I created. Have you ever been out shopping and there is a really awesome sale going on? Well

Free42 : An HP-42S Calculator Simulator

------------------------------------------------------------------------------- Free42 is a software clone of the Hewlett-Packard 42S calculator. If y

An experimental prototype calculator.

What is NumberPad NumberPad is an experimental prototype to explore how we write, visualize, and manipulate math equations. This post highlights some

SIP calculator calculates the future value of SIP (Systematic Investment Plan) payments.
SIP calculator calculates the future value of SIP (Systematic Investment Plan) payments.

SIP calculator calculates the future value of SIP (Systematic Investment Plan) payments. This app is available in the AppStore. Learn more here. #Desc

Implementation of LondonAppBrewery's BMI Calculator App
Implementation of LondonAppBrewery's BMI Calculator App

BMI Calculator 💪 Our Goal The objective of this tutorial is to look at how we can customise Flutter Widgets to achieve our own beautiful user interfa

Recreation of calculator-checklist project in SwiftUI

Calculator Checklist A project created out of curiosity to test the waters of SwiftUI, Apple's new UI Framework. The caculator-checklist concept was o

Comments
  • Migrate to Swift 4.0

    Migrate to Swift 4.0

    Hi Lukhnos Liu!

    I've just done a migration to Swift 4 for your app during Hacktoberfest 2017. Will be happy if you merge it. Also as you asked: I allow you to use my code and adjustments in the paid app without compensation.

    opened by nadein 2
Owner
Lukhnos Liu
Lukhnos Liu
Splito - Nice and easy-to-use billing and tip calculator with swift

Splito! Nice and easy-to-use billing and tip calculator

Aleksandr Morozov 9 Dec 30, 2022
Tippy is a tip calculator application for iOS.

Pre-work - Tippy Tippy is a tip calculator application for iOS. Submitted by: Shoaib Huq Time spent: 5 hours spent in total User Stories The following

Shoaib Huq 0 Nov 24, 2021
Tipculator is a tip calculator application for iOS.

Pre-work - Tipculator Tipculator is a tip calculator application for iOS. Submitted by: Jordan Sukhnandan Time spent: Prework-> 3 hours Additional fea

Jordan Sukhnandan 0 Feb 1, 2022
CodePathPrework - The pre-work assignment for the CodePath program. Involves making a tip calculator using XCode.

Pre-work - Tip Calculator Tip Calculator is a tip calculator application for iOS. Submitted by: David Zhu Time spent: 3 hours spent in total User Stor

null 0 Jan 3, 2022
A hobby project using Swift protocol and Swift 5.7's new generics to build an iOS Calculator-like calculator.

Calculator A hobby project using Swift protocol and Swift 5.7's new generics to build an iOS Calculator-like calculator. Highlights: You can use Calcu

Kyle 4 Oct 24, 2022
Calculator: an iOS application that does the job of a normal calculator

Calculator Calculator is an iOS application that does the job of a normal calculator. ✨ Application Features It is a simple iOS app built by Swift, wh

Alharbi 2 Jan 27, 2022
Bill splitting and tip calculating app, build with UIKit and MVC pattern.

Split Check Bill splitting and tip calculating app, build with UIKit and MVC pattern. Features Enter bill total with number pad. Select tip % and betw

Anibal Ventura 0 Jan 7, 2022
Bill splitting app with tip feature

Tipsy Tipsy is a bill splitting app with tip feature. You can split the total bi

Emrullah Cirit 4 Nov 29, 2022
BMI-Calculator - An app which calculates the BMI and gives suggestion

BMI-Calculator An app which calculates the BMI and gives suggestion with MVC pat

null 0 Jan 19, 2022
Basic calculator app for iOS devices using Swift3. Created for learning purpose.

iOS Calculator App Basic calculator app for iOS devices using Swift 4 and Xcode 9. Created for learning purpose. How to use Just download source code

Jogendra 15 Dec 28, 2022