mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
17 lines
568 B
Swift
17 lines
568 B
Swift
//
|
|
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
import UIKit
|
|
|
|
class AttachmentTextView: UITextView {
|
|
// When creating new lines, contentOffset is animated, but because
|
|
// we are simultaneously resizing the text view, this can cause the
|
|
// text in the textview to be "too high" in the text view.
|
|
// Solution is to disable animation for setting content offset.
|
|
override func setContentOffset(_ contentOffset: CGPoint, animated: Bool) {
|
|
super.setContentOffset(contentOffset, animated: false)
|
|
}
|
|
}
|