Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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