Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
[ad_1]
I’ve a query, how is it potential to implement the creation of a customized again navigation button inside an UIView(). I’ve a important controller which accommodates a collectionView, clicking on any cell goes to a second controller which accommodates a tableView. I created a separate customized view contained in the tableView headers the place I added labels, photos, buttons. I would like when clicking a backButton inside a customized view, it should go to the primary controller. How could be carried out? I making app solely programmatically – (No Storyboard)
CustomView.swift
lazy var backButton: UIButton = {
let button = UIButton(sort: .system)
let picture = UIImage(systemName: "chevron.left")
button.setImage(picture, for: UIControl.State())
button.tintColor = .white
button.isHidden = true
button.addTarget(self, motion: #selector(goToBack), for: .touchUpInside)
button.translatesAutoresizingMaskIntoConstraints = false
return button
}()
@objc func goToBack() {
}
[ad_2]