问题
I try but can't show the button
Code:
btnLokasiSaya = UIButton(frame: CGRect(x: 341, y: 28, width: 100, height: 30))
self.viewMap.addSubview(btnLokasiSaya)
StoryBoard:
Output: my button is not found in simulation
回答1:
In your Main.Storyboard
add button outside the mapview
as shown below:
来源:https://stackoverflow.com/questions/52440728/add-some-button-to-gmsmapview-google-map-and-change-the-image-button