This is a calculator with UI focused on the Bulgarian language, that allows you to calculate your monthly electric bill, based on your Usage, Power Consumption, and local Price.
- Clone and install the project (see the "Installation" instructions down below) - NOTE: This app uses cocoapods. You need to install Ruby, Cocoapds, and HomeBrew to clone, view or contribute to the project.
- Open the app on your iOS device or simulator.
- Navigate to the settings page on the simulator to customize preferences.
- General -> Language & Region -> Number Format -> Set to 4th option (1234 567.89)
- Use the main screen to interact with the core features
- Input your details in the text fields:
- Click "Калкулирай" to show you how much this appliance will cost in a day/week/month:
- Click "Запази" to save your data:
- After adding your data, you can navigate to the "Резултат" screen. There you can see a list of all the appliances the user added. On the top, there are 3 items: two buttons and one label. The label calculates all of the appliances's monthly bills and adds them to the label. If the monthly sum is lower than 150 the label's text will be green, if it is lower than 200 it will be yellow, and higher than that it will be red.
- The app uses Realm to store the user's database. If you close the app, the user's data will be persisted and will stay intact:
- When inputting your power consumption data, you can choose between kWh and Wh. Based on what you choose the calculations will be correct. Sometimes the appliance company does not provide the kWh power usage, but it gives the watts per hour. The formula for calculating the monthly bill is kWh * timePerHour * price:
- If the user is inputting text fields, they can dismiss the keyboard by clicking anywhere on the screen:
- When the user is in the "Резултат" screen, he can delete individual cells, by swiping right. When a user does that, the label that calculates the monthly bill sum automatically updates. If he chooses to click the "trash" icon in the upper left corner, it will delete all the cells at ones.
In this project, I have used some cocoapods to add functionality to the app. Here is the list:
- RealmSwift
- SwipeCellKit
- IQKeyboardManagerSwift
- Clone the repository
git clone https://github.com/John-Mark01/BG_ElectroBill.git
- Install CocoaPods
- open Terminal
cd BG_ElectroBill pod init
- open pod file and paste:
pod 'RealmSwift', '~>10' pod 'SwipeCellKit' pod 'IQKeyboardManagerSwift'
- head back to Terminal
pod install
- Open the ".xcworkspace" file
- Enjoy
If you want to contribute to this project or have any questions, you can contact me:
- Email: johnmark.iliev@gmail.com
- Facebook: https://www.facebook.com/john.iliev.92/