mirror of
https://github.com/MessageKit/MessageKit.git
synced 2026-02-06 19:03:19 +00:00
Fix side effect of inputAccessoryView rendering bug fix
This commit is contained in:
@@ -49,6 +49,9 @@ open class MessagesCollectionView: UICollectionView {
|
||||
override public init(frame: CGRect, collectionViewLayout layout: UICollectionViewLayout) {
|
||||
super.init(frame: frame, collectionViewLayout: layout)
|
||||
backgroundColor = .white
|
||||
// https://stackoverflow.com/questions/31049651/uitextview-as-inputaccessoryview-doesnt-render-text-until-after-animation
|
||||
// Calling this here avoids a side effect where the inputAccessoryView dissapears after tap
|
||||
snapshotView(afterScreenUpdates: true)
|
||||
}
|
||||
|
||||
required public init?(coder aDecoder: NSCoder) {
|
||||
|
||||
@@ -58,8 +58,6 @@ open class MessagesViewController: UIViewController {
|
||||
registerReusableViews()
|
||||
setupDelegates()
|
||||
|
||||
// https://stackoverflow.com/questions/31049651/uitextview-as-inputaccessoryview-doesnt-render-text-until-after-animation
|
||||
inputAccessoryView?.snapshotView(afterScreenUpdates: true)
|
||||
}
|
||||
|
||||
override open func viewDidLayoutSubviews() {
|
||||
|
||||
Reference in New Issue
Block a user