简体   繁体   中英

How to make a left/right segue that follows the position of the finger in Xcode

So im not new to xCode, been coding for awhile, but recently I've been looking into custom segues. So i was able to easily create a left/right sliding segue, but i was wondering how to get it to track finger sliding, similar to how whatsapp's segue works. so like the more i slide my finger to the left/ right, the more of the destination view controller is shown, and less of the source view controller. (objective c) (swift example will be helpful too). Appreciate the help.

This approach is called sidebar navigation. A lot of examples are available online. At least, you can refer to: http://www.appcoda.com/ios-programming-sidebar-navigation-menu/ or http://www.raywenderlich.com/32054/how-to-create-a-slide-out-navigation-like-facebook-and-path

Source code snippet can be taken from: https://github.com/jdehlin/Xamarin-Sidebar

Another unusual approach here: https://github.com/twotoasters/TWTSideMenuViewController

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM