Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make half curl animation in iPhone like the maps app?

I am using the following code for page curl animation

[UIView beginAnimations:@"yourAnim" context:nil];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:yourView cache:cacheFlag];
...
[UIView commitAnimations];

Is it possible to make the half curl animation like the maps.app on iphone/ipod ?

Any ideas how to make an similar effect ?

Thanks

like image 950
Biranchi Avatar asked May 19 '10 05:05

Biranchi


People also ask

How do I make my Iphone 3D map?

View a 3D mapDrag two fingers up. On the Satellite map, tap 3D near the top right. On supported models and in select cities, tap 3D near the top right. (See Detailed City Experience on the iOS and iPadOS Feature Availability website.)

How do you customize maps on Iphone?

In the Maps app , you can quickly find your settings for preferences, guides, favorites, and more. Tap your picture or initials at the top right of the search card, then choose an option.


1 Answers

Apple does support this for the presentation of modal views as of 3.2. This makes sense: the page curl effect is intended to signal the user that a page of options or settings is being revealed, and when they are done changing things, they will be sent back to the original view. Apple doesn't want the animation to infer an ongoing change to the page hierarchy, just a modal one that must return to its starting place.

It's pretty straightforward to use; just be sure that you are starting from a full screen view, and loading with the UIModalPresentationFullScreen style, which I believe is the default.

There are animation transitions to use a similar effect in UIViews generally that were added as of 4.0, but this is a straightforward way to use the effect.

simpleVC * myModalVC = [[simpleVC alloc] init];
[myModalVC setModalTransitionStyle:UIModalTransitionStylePartialCurl];
[myModalVC setDelegate:self];

[self presentModalViewController:myModalVC animated:YES];
[simpleVC release];

Link to Apple Docs on UIModalTransitionStyle constants

like image 84
giff Avatar answered Sep 22 '22 02:09

giff