Fix navigation bar layout
This commit is contained in:
parent
7762418ac1
commit
163179dee7
|
@ -252,12 +252,21 @@ final class HomeVC : UIViewController, UITableViewDataSource, UITableViewDelegat
|
|||
let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(openSettings))
|
||||
profilePictureView.addGestureRecognizer(tapGestureRecognizer)
|
||||
navigationItem.leftBarButtonItem = UIBarButtonItem(customView: profilePictureView)
|
||||
let newClosedGroupButton = UIBarButtonItem(image: #imageLiteral(resourceName: "btnGroup--white"), style: .plain, target: self, action: #selector(createClosedGroup))
|
||||
|
||||
let newClosedGroupButton = UIButton(type: .custom)
|
||||
newClosedGroupButton.setImage(#imageLiteral(resourceName: "btnGroup--white"), for: UIControl.State.normal)
|
||||
newClosedGroupButton.addTarget(self, action: #selector(createClosedGroup), for: UIControl.Event.touchUpInside)
|
||||
newClosedGroupButton.tintColor = Colors.text
|
||||
navigationItem.rightBarButtonItem = newClosedGroupButton
|
||||
let joinPublicChatButton = UIBarButtonItem(image: #imageLiteral(resourceName: "Globe"), style: .plain, target: self, action: #selector(joinPublicChat))
|
||||
|
||||
let joinPublicChatButton = UIButton(type: .custom)
|
||||
joinPublicChatButton.setImage(#imageLiteral(resourceName: "Globe"), for: UIControl.State.normal)
|
||||
joinPublicChatButton.addTarget(self, action: #selector(joinPublicChat), for: UIControl.Event.touchUpInside)
|
||||
joinPublicChatButton.tintColor = Colors.text
|
||||
navigationItem.rightBarButtonItems = [ /*createPrivateGroupChatButton,*/ joinPublicChatButton ]
|
||||
|
||||
let buttonStackView = UIStackView(arrangedSubviews: [ newClosedGroupButton, joinPublicChatButton ])
|
||||
buttonStackView.axis = .horizontal
|
||||
|
||||
navigationItem.rightBarButtonItem = UIBarButtonItem(customView: buttonStackView)
|
||||
}
|
||||
|
||||
// MARK: Interaction
|
||||
|
|
Loading…
Reference in New Issue