I am new to iOS Programming and I have downloaded the google maps sdk for iOS and followed the instruction on their website ( as shown in this link https://developers.google.com
This problem occur because you try to add the map view with the code, earlier you add the button with the help of interface builder. When you add the mapView it would add at the top of the view that's why your button is not shown.
You have two options for doing this.
First approach
Drag and drop the UIButton from the interface builder and set the constraints accordingly
Then create the outlet of that button in the corresponding viewController
@IBOutlet weak var bottonToAdd: UIButton!
After adding the map view to the view paste the blow code to bring the button at the top
mapViewForScreen.addSubview(self.bottonToAdd)
mapViewForScreen.bringSubviewToFront(self.bottonToAdd)
After the above three step you can find out that you hav the button over mapview
Second approach
If you don't want to use the interface builder you can use the below code for the same.
var bottonToAdd:UIButton = UIButton()
bottonToAdd.setTitle("Button To Add", for: .normal)
bottonToAdd.sizeToFit()
bottonToAdd.center = mapViewForScreen.center
bottonToAdd.tintColor = UIColor.blue
mapViewForScreen.addSubview(bottonToAdd)
mapViewForScreen.bringSubviewToFront(bottonToAdd)