mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-23 14:18:07 +00:00
Add safe area constraints of BackActionNavigationVIew
This commit is contained in:
parent
12560d7910
commit
c0ffa210ec
2 changed files with 15 additions and 9 deletions
|
|
@ -112,9 +112,11 @@ class ChatConversationTableViewSwift: UIViewController, UICollectionViewDataSour
|
|||
if let event = ChatConversationTableViewModel.sharedModel.getMessage(index: indexPath.row){
|
||||
cell.configure(event: event)
|
||||
|
||||
cell.onLongClickOneClick {
|
||||
self.initDataSource(message: event.chatMessage!)
|
||||
self.tapChooseMenuItemMessage(contentViewBubble: cell.contentViewBubble, event: event, preContentSize: cell.preContentViewBubble.frame.size.height)
|
||||
if (event.chatMessage != nil){
|
||||
cell.onLongClickOneClick {
|
||||
self.initDataSource(message: event.chatMessage!)
|
||||
self.tapChooseMenuItemMessage(contentViewBubble: cell.contentViewBubble, event: event, preContentSize: cell.preContentViewBubble.frame.size.height)
|
||||
}
|
||||
}
|
||||
|
||||
if (!cell.replyContent.isHidden && event.chatMessage?.replyMessage != nil){
|
||||
|
|
@ -168,8 +170,6 @@ class ChatConversationTableViewSwift: UIViewController, UICollectionViewDataSour
|
|||
let coordinateMin = contentViewBubble.convert(contentViewBubble.frame.origin, to: view)
|
||||
let coordinateMax = contentViewBubble.convert(CGPoint(x: contentViewBubble.frame.maxX, y: contentViewBubble.frame.maxY), to: view)
|
||||
|
||||
print("ChatConversationTableViewSwift collectionview cellForItemAt longclick")
|
||||
|
||||
if (coordinateMax.y + CGFloat(menu!.dataSource.count * 44) - preContentSize < view.frame.maxY) {
|
||||
menu!.bottomOffset = CGPoint(x: event.chatMessage!.isOutgoing ? coordinateMax.x - 200 : coordinateMin.x, y: coordinateMax.y - preContentSize)
|
||||
} else if ((coordinateMax.y + CGFloat(menu!.dataSource.count * 44) > view.frame.maxY) && coordinateMin.y > CGFloat(menu!.dataSource.count * 44) + (preContentSize * 2)) {
|
||||
|
|
@ -198,7 +198,7 @@ class ChatConversationTableViewSwift: UIViewController, UICollectionViewDataSour
|
|||
case VoipTexts.bubble_chat_dropDown_delete:
|
||||
self!.deleteMessage(message: event.chatMessage!)
|
||||
default:
|
||||
print("ChatConversationTableViewSwift collectionview cellForItemAt longclick default")
|
||||
print("Error ChatConversationTableViewSwift TapChooseMenuItemMessage Default")
|
||||
}
|
||||
self!.menu!.clearSelection()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,9 +92,12 @@ class BackActionsNavigationView: UIViewController {
|
|||
self.backAction = backAction
|
||||
self.action1 = action1
|
||||
self.action2 = action2
|
||||
|
||||
|
||||
self.view.addSubview(topBar)
|
||||
topBar.alignParentTop().height(top_bar_height).matchParentSideBorders().done()
|
||||
//topBar.alignParentTop().height(top_bar_height).matchParentSideBorders().done()
|
||||
topBar.alignParentTop().height(top_bar_height).done()
|
||||
topBar.leftAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leftAnchor).isActive = true
|
||||
topBar.rightAnchor.constraint(equalTo: view.safeAreaLayoutGuide.rightAnchor).isActive = true
|
||||
|
||||
topBar.addSubview(backButton)
|
||||
backButton.alignParentLeft(withMargin: side_buttons_margin).matchParentHeight().done()
|
||||
|
|
@ -164,7 +167,10 @@ class BackActionsNavigationView: UIViewController {
|
|||
stackView.translatesAutoresizingMaskIntoConstraints = false
|
||||
view.addSubview(stackView)
|
||||
|
||||
stackView.alignParentTop().alignParentBottom().matchParentSideBorders().done()
|
||||
//stackView.alignParentTop().alignParentBottom().matchParentSideBorders().done()
|
||||
stackView.alignParentTop().alignParentBottom().done()
|
||||
stackView.leftAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leftAnchor).isActive = true
|
||||
stackView.rightAnchor.constraint(equalTo: view.safeAreaLayoutGuide.rightAnchor).isActive = true
|
||||
|
||||
stackView.addArrangedSubview(contentView)
|
||||
contentView.alignParentTop(withMargin: top_bar_height).matchParentSideBorders().done()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue