Skip to content

Instantly share code, notes, and snippets.

@azamsharp
Created November 27, 2017 21:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azamsharp/0f321468dfffc9e8b6d168efee02e72e to your computer and use it in GitHub Desktop.
Save azamsharp/0f321468dfffc9e8b6d168efee02e72e to your computer and use it in GitHub Desktop.
AddSourceViewModel
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