Created
November 27, 2017 21:52
-
-
Save azamsharp/0f321468dfffc9e8b6d168efee02e72e to your computer and use it in GitHub Desktop.
AddSourceViewModel
This file contains hidden or 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
class AddSourceViewModel { | |
var title :String! | |
var description :String! | |
func remainingNumberOfAllowedCharacters(numberOfCharactersEntered :Int, limit :Int) -> Int { | |
let count = limit - numberOfCharactersEntered | |
if count < 0 { | |
return 0 | |
} | |
return count | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment