iosswiftxcodeanimationside-menu

How to Have a Side Menu Slide Along With Finger?


I'm building an app in XCode with Swift, and right now I have a side menu that appears when the button is tapped, and it disappears when the button is tapped again (or the dim area is tapped):

HomeView Home View <--------------> Side Menu Menu

I'd like to be able to slide the menu out from the side, and slide to close it (like plenty of popular apps do), where the edge of the menu kind of follows the finger as you slide. How can I achieve this?


Solution

  • For anyone looking to an answer for this, I recommend using a Cocoapod called "SideMenu." The API is quite simple and it makes side menus a whole lot easier.