0

The current setup I have is a UIView over a map view that's meant to encapsulate the search bar (to make it look rounded). However, the first time I click on the search bar, it animates over the view for some reason, and then goes back to normal, but every other time, the animation stays within the view. The images below visualize the problem. I'm not entirely sure how to get started on fixing this -- any tips?

I instantiate the search bar and search results controller programmatically.

normal view (search bar not clicked)

the first time you click on the search bar vs every other time you click on it

ak24
  • 1
  • 1

1 Answers1

0

I think you need to add constraints to fix this issue. And if possible try adding your search bar inside a UIStackView and then add constraints to the stack view.

VIP-DEV
  • 221
  • 1
  • 6