Skip to content

Commit

Permalink
impl marcel suggestions to use bottomAnchor
Browse files Browse the repository at this point in the history
  • Loading branch information
rapterjet2004 committed Oct 10, 2024
1 parent fd8f9f0 commit 60a7418
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions NextcloudTalk/BaseChatViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1528,15 +1528,15 @@ import SwiftUI
guard let expandedVoiceMessageRecordingView = hostingController.view else { return }

self.expandedUIHostingController = hostingController
self.textInputbar.addSubview(expandedVoiceMessageRecordingView)
self.view.addSubview(expandedVoiceMessageRecordingView)

expandedVoiceMessageRecordingView.translatesAutoresizingMaskIntoConstraints = false

let views = [
"expandedVoiceMessageRecordingView": expandedVoiceMessageRecordingView
]

self.view.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "V:|-(>=0)-[expandedVoiceMessageRecordingView]|", metrics: nil, views: views))
expandedVoiceMessageRecordingView.bottomAnchor.constraint(equalTo: self.textInputbar.bottomAnchor).isActive = true
self.view.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "H:|[expandedVoiceMessageRecordingView]|", metrics: nil, views: views))
}

Expand Down

0 comments on commit 60a7418

Please sign in to comment.