Location Details
class LocationDetailsController: UIViewController, MPMapControlDelegate {var mapControl: MPMapControl?var detailsView = UIStackView()
var mainView = UIStackView()
var nameLabel = UILabel()
var descrLabel = UILabel()mapControl?.delegate = self
nameLabel.backgroundColor = UIColor.white
descrLabel.backgroundColor = UIColor.whitedetailsView = UIStackView(arrangedSubviews: [nameLabel, descrLabel])
detailsView.axis = .verticalmainView = UIStackView(arrangedSubviews: [map!, detailsView])
mainView.axis = .verticalLast updated
Was this helpful?