Modified from http://www.hanspinckaers.com/multi-line-uitextview-similar-to-sms