ghostrider
ghostrider

Reputation: 5259

MKMapView inside a UIScrollView

I want to create something similar to these pictures in the FourSquare.

So, when the user scrolls down, after a certain point , the height of the map changes and takes almost all of the screen, and the rest screen is moving down.

What structure should I use?

Should I use an MKMapView inside a scrollview? How do I set that if the scrolling is not half the screen then you should bounce back?

mapview in the initial size

when scrolling down

Upvotes: 2

Views: 1450

Answers (1)

Duncan C
Duncan C

Reputation: 131491

No, you should not put your map view inside a scroll view. Instead, I would suggest making the map view extend all the way to the bottom of the screen, then covering it with the table view from the bottom. Disable scrolling on the table view, and attach a pan gesture recognizer. Write code that slides the table view down with a downward pan gesture.

That should do it.

Upvotes: 4

Related Questions