开发者

corner like in maps App

I need a corner like in the Maps app.

corner like in maps App

I tried this code but nothing happens:

- (IBAction) performCurl {
// Curl the image up or down
CATransition *animation = [CATransition animation];
[animation setDelegate:self];
[animation setDuration:1开发者_Go百科.0f];
[animation setTimingFunction:UIViewAnimationCurveEaseInOut];
[animation setType:(notCurled ? @"mapCurl" : @"mapUnCurl")];
[animation setRemovedOnCompletion:NO];
[animation setFillMode: @"extended"];
[animation setRemovedOnCompletion: NO];
notCurled = !notCurled;
[[topView layer] addAnimation:animation forKey:@"pageFlipAnimation"];

}

This my test-project: http://isolute.de/downloads/cornertest2.zip


This was made available in iOS 3.2 and later

UIModalTransitionStylePartialCurl 

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

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.

Available in iOS 3.2 and later. Declared in UIViewController.h.


See the answer to another question for one solution.

Note however that this answer uses [animation setRemovedOnCompletion: NO]. According to a forum post, apps have been rejected for using this undocumented API method.

Also, the mapCurl animation type is undocumented, and apps have been rejected for using it as well.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜