I'm prototyping an iPad app.
I need to animate a panel into view when the user taps, then out of view when the user taps again in the same place which I think is why I'm stuck.
I've figured out how to animate the transition into view shown in steps (1) and (2)
However, I can't figure out how to then animate it back off screen by tapping in the same place shown in steps (3) and (4).
I considered putting a nearly transparent control hidden on the map in the same place, so that essentially I'd have 2 controls to tap on, the map and the transparent box (sort of like a hotspot), however, that didn't work because how would the screen know which item I tapped, the transparent box on top, or the map underneath. I know I could do it with two hotspots (transparent boxes) on the map in different places, but I was hoping to be able to tap in the same place... so basically the map would have to be able to distinguish when the panel is visible vs. when it's not to know whether to slide the panel into view or slide it out.
Ahh haa, I found it. You have to edit the first interaction, and choose to reverse the action when the user taps again.