Constraint custom view en navigation controllers

//Navigation buttons // * * Profile self.ivProfile = UIImageView(image: #imageLiteral(resourceName: "iconDefaultUser")) self.ivProfile.cornerRadius(50 / 2) let widthConstraint = self.ivProfile.widthAnchor.constraint(equalToConstant: 50) let heightConstraint = self.ivProfile.heightAnchor.constraint(equalToConstant: 50) heightConstraint.isActive = true widthConstraint.isActive = true let btnItemProfile = UIBarButtonItem(customView: ivProfile) btnItemProfile.target = self btnItemProfile.action = #selector(self.openProfile) self.navigationItem.leftBarButtonItem = btnItemProfile

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.