1

I'm currenly developing a screen similar to Google Map's bottom view:

enter image description here

I have created a UIViewController that displays the map and handles the markers on the map. When a user taps on a marker, a bottom view appears partially as shown in Google Maps app. The bottom view is added as a subview and appears partially with animation when a marker is tapped.

I wanted to create a floating button like the one in the picture, so I added a UIButton and its origin.y = -(button.height / 2) so it floats with its midY on the edge of the view. The problem is the button's half is disappeared and not floating on the view. I've researched solutions and I found this, I'm wondering if this is the best solution, or there is a simpler one.

Note: the button moves with the bottom view when it's dragged upward and becomes a full view.

Community
  • 1
  • 1
Shawerma
  • 171
  • 1
  • 4
  • 12

0 Answers0