mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 16:42:44 +02:00
Fix layout to show all of the topic
This commit is contained in:
@@ -49,10 +49,7 @@ final class RoomInfoListViewController: UIViewController {
|
||||
}()
|
||||
|
||||
private lazy var basicInfoView: RoomInfoBasicView = {
|
||||
let view = RoomInfoBasicView.loadFromNib()
|
||||
view.autoresizingMask = .flexibleWidth
|
||||
view.translatesAutoresizingMaskIntoConstraints = true
|
||||
return view
|
||||
return RoomInfoBasicView.loadFromNib()
|
||||
}()
|
||||
|
||||
private lazy var leaveAlertController: UIAlertController = {
|
||||
@@ -127,6 +124,19 @@ final class RoomInfoListViewController: UIViewController {
|
||||
return self.theme.statusBarStyle
|
||||
}
|
||||
|
||||
override func viewDidLayoutSubviews() {
|
||||
super.viewDidLayoutSubviews()
|
||||
|
||||
let height = ceil(basicInfoView.systemLayoutSizeFitting(CGSize(width: view.bounds.width, height: 0)).height)
|
||||
|
||||
// compare heights to avoid infinite loop
|
||||
if height != basicInfoView.frame.height {
|
||||
var headerFrame = basicInfoView.frame
|
||||
headerFrame.size.height = height
|
||||
basicInfoView.frame = headerFrame
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private func updateSections(with viewData: RoomInfoListViewData) {
|
||||
|
||||
Reference in New Issue
Block a user