refactor: Use blurred button in simulator map
This commit is contained in:
@@ -52,6 +52,14 @@ class AlertSimulatorViewController: UIViewController, MKMapViewDelegate {
|
||||
return view
|
||||
}()
|
||||
|
||||
private lazy var closeButton: EQNBlurredCloseButton = {
|
||||
let button = EQNBlurredCloseButton()
|
||||
button.translatesAutoresizingMaskIntoConstraints = false
|
||||
button.addTarget(self, action: #selector(closeTapped(_:)), for: .touchUpInside)
|
||||
button.setTitleColor(.darkGray, for: .normal)
|
||||
return button
|
||||
}()
|
||||
|
||||
private lazy var mapView: MKMapView = {
|
||||
let map = MKMapView()
|
||||
map.translatesAutoresizingMaskIntoConstraints = false
|
||||
@@ -95,6 +103,7 @@ class AlertSimulatorViewController: UIViewController, MKMapViewDelegate {
|
||||
|
||||
private func setupUI() {
|
||||
view.addSubview(mapView)
|
||||
view.addSubview(closeButton)
|
||||
view.addSubview(viewfinderView)
|
||||
view.addSubview(calculateButton)
|
||||
|
||||
@@ -103,6 +112,8 @@ class AlertSimulatorViewController: UIViewController, MKMapViewDelegate {
|
||||
mapView.leftAnchor.constraint(equalTo: view.leftAnchor).isActive = true
|
||||
mapView.rightAnchor.constraint(equalTo: view.rightAnchor).isActive = true
|
||||
|
||||
closeButton.addDefaultConstraint(to: view)
|
||||
|
||||
viewfinderView.topAnchor.constraint(equalTo: mapView.topAnchor).isActive = true
|
||||
viewfinderView.bottomAnchor.constraint(equalTo: mapView.bottomAnchor).isActive = true
|
||||
viewfinderView.leftAnchor.constraint(equalTo: mapView.leftAnchor).isActive = true
|
||||
|
||||
Reference in New Issue
Block a user