ios7 - In iOS 7, with customer VC transitioning, is it possible to make "fromviewcontroller" on screen after presentViewController? -


many apps have feature which, user can pull down 1 view, , view shows underneath it. first view still visible on bottom. (e.g. facebook paper app).

if other view view controller, possible achieve using ios 7's custom view controller transitioning api ?

in test, possible "presenting" part, "dismissing" part has glitch. whenever call dismissviewcontroller, "toviewcontroller" takes on full screen before calling transitioningdelegate methods.

anyone more familiar ? !

if other view view controller, possible achieve using ios 7's custom view controller transitioning api ?

yes, it's possible. can use snapshot api take snapshot of uiview. can take snapshot of view controller you're transitioning from, add containerview below view controller you're transitioning to.

for example, in -animatetransition: method of class adopts uiviewcontrolleranimatedtransitioning take snapshot of view controller you're transitioning , add subview beneath view controller you're transitioning to:

- (void)animatetransition:(id <uiviewcontrollercontexttransitioning>)transitioncontext {      uiview * containerview = transitioncontext.containerview;     uiviewcontroller *fromviewcontroller = [transitioncontext viewcontrollerforkey:uitransitioncontextfromviewcontrollerkey];     uiviewcontroller *toviewcontroller = [transitioncontext viewcontrollerforkey:uitransitioncontexttoviewcontrollerkey];      // take snapshot of view controller     uiview * fromsnapshotview = [fromviewcontroller.view snapshotviewafterscreenupdates:no];     [containerview insertsubview:fromsnapshotview belowsubview:toviewcontroller.view];      // animations on view controller animate view fromsnapshotview      // finally, don't forget call:     [transitioncontext completetransition:![transitioncontext transitionwascancelled]]; } 

in test, possible "presenting" part, "dismissing" part has glitch. whenever call dismissviewcontroller, "toviewcontroller" takes on full screen before calling transitioningdelegate methods.

if call dismiss doesn't fire transitioning delegate methods make sure set transitioning delegate on view controller before dismissing.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -