1

I seem to recall a few years back that Apple Maps had a segue that would roll back the map from the bottom right corner to reveal options such as 2D/3D, add traffic conditions etc. But the map was still partially visible.

Does this segue still exist? I'm presenting information about various beers... ABV for example.. but there are many others. I want to add an information button that will present the definition of (Alcohol By Volume) without transitioning abruptly to completely different View.

Undo
  • 25,519
  • 37
  • 106
  • 129
Martin Muldoon
  • 3,388
  • 4
  • 24
  • 55

2 Answers2

1

I believe it does still exist - see the UIModalTransitionStyle documentation:

UIModalTransitionStylePartialCurl

When the view controller is presented, one corner of the current view curls up to reveal the presented view underneath. On dismissal, the curled up page unfurls itself back on top of the presented view. A view controller presented using this transition is itself prevented from presenting any additional view controllers.

This transition style is supported only if the parent view controller is presenting a full-screen view and you use the UIModalPresentationFullScreen modal presentation style. Attempting to use a different form factor for the parent view or a different presentation style triggers an exception.

It's not marked as deprecated, so it must still exist. There have been a few issues with it, but I believe it still should work.

Community
  • 1
  • 1
Undo
  • 25,519
  • 37
  • 106
  • 129
  • Thank you Undo. I found it but it is not working because...."supported only if the parent view controller is presenting a full-screen view" myView does not take up the whole screen. If I make myView a subview of a view that IS full screen, but not visible is there anyway I can accomplish this? Thanks! – Martin Muldoon Nov 11 '15 at 19:01
  • @MartinMuldoon Yep, that's the requirement for it. Have you tried using a different parent view controller? – Undo Nov 11 '15 at 19:01
1

You may use the following animation for subView UIViewAnimationTransitionCurlUp. Here is the sample code:

[UIView beginAnimations:@"PartialPageCurlEffect" context:nil];
[UIView setAnimationDuration:0.3];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:myOldSubViewController.view cache:YES];
[myOldSubViewController.view addSubview:myNewViewController.view];
[UIView commitAnimations];
casillas
  • 16,351
  • 19
  • 115
  • 215