This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright © 2019 Alexey Naumov. MIT License | |
import Foundation | |
enum Loadable<Value> { | |
case notRequested | |
case isLoading(prevValue: Value?) | |
case loaded(Value) | |
case failed(Error) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### CocoaPods ### | |
## CocoaPods GitIgnore Template | |
# CocoaPods - Only use to conserve bandwidth / Save time on Pushing | |
# - Also handy if you have a large number of dependant pods | |
# - AS PER https://guides.cocoapods.org/using/using-cocoapods.html NEVER IGNORE THE LOCK FILE | |
Pods/ | |
### Swift ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Icon</key> | |
<string>TemplateIcon</string> | |
<key>SortOrder</key> | |
<string>1</string> | |
<key>Description</key> | |
<string>This generates a new scene using MVVM architecture. It consists of the view controller, view model and navigator.</string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
/** Percent increase formula | |
* Percentage increase is useful when you want to analyse how a value has changed with time. Although percentage increase is very similar to absolute increase, the former is more useful when comparing multiple data sets. For example, a change from 1 to 51 and from 50 to 100 both have an absolute change of 50, but the percentage increase for the first is 5000%, while for the second it is 100%, so the first change grew a lot more. This is why percentage increase is the most common way of measuring growth. | |
* https://www.omnicalculator.com/math/percentage-increase | |
* https://www.omnicalculator.com/math/percentage-change | |
*/ | |
///Percent increase = [(new value - original value)/original value] * 100 | |
func percentIncrease(newValue:Double, originalValue:Double) -> Double{ |