Updated custom text view code for iOS 7