ios - How to swipe a View controller over the top of another view controller? -
i have table view controller , view controller. requirement need swipe table view controller half on view controller when swipe view controller. image can show this:
is possible achieve using swipegesture . if possible how can in swift3?
while there libraries out there you, if going yourself, basic idea can create "swipe edge" gesture recognizer initiate custom presentation of view controller (that has menu on it). consists of:
a custom transitioning delegate (conforming
uiviewcontrollertransitioningdelegateprotocol) specifies animation controller , interaction controller (both described below) used during presentation of next scene;an animation controller (conforming
uiviewcontrolleranimatedtransitioning) dictates animation of scene right edge;an interaction controller (a
uipercentdriveninteractivetransition) can use optionally drive transition via gesture;a presentation controller (a
uipresentationcontrollersubclass) dictates whether presented view removed or not (in case not want removed), other chrome animated alongside animated presentation of new scene (e.g. dim or blur presenting view); andgesture recognizers drive interaction controller.
for more information, see wwdc videos custom transitions using view controllers , a inside presentation controllers.
see https://github.com/robertmryan/swiftcustomtransitions/tree/rightside swift 3 example renders following ux:
this admittedly complicated enough may want consider third party libraries presenting slide-in menus. if wanted "roll own", these basic pieces involved.


Comments
Post a Comment