Reputation: 139
I want to add another view below the Map but the view disappear at run time.
at run time typeView disappears because of googlemap
edit
Upvotes: 1
Views: 1245
Reputation: 493
Create storyboard connection the views,
@IBOutlet weak var mapView: GMSMapView!
@IBOutlet weak var typeView: UIView!
Now, you can solve the issue by two ways,
One way:
self.mapView.sendSubview(toBack: self.typeView)
The Second Way:
self.view.bringSubview(toFront: self.typeView)
Upvotes: 3
Reputation: 1925
From what you asked, I understand that you want Type view to be shown over the Google Map. If so, then
Simply create an IBOutlet of the Type view as:
@IBOutlet weak var typeView: UIView!
Use the below code to bring the typeView on the front:
self.bringSubview(toFront: self.typeView)
(I am assuming that this code is to go in View)
Upvotes: 2