Is there a full pagecurl? updated

Well, I really like the effect of pagecurl, only one problem, when sending feedback email from the application, partialPageCurl covers the cancel button and most of the send button for mail. Buttons still work, but users don’t see them. Is there a way to get partialPageCurl in fullPageCurl where it is almost completely disconnected from the screen? Thanks in advance! This is how I click the view.

- (IBAction)HelpClicked{ MoreHelp *More = [[MoreHelp alloc] initWithNibName:nil bundle:nil]; More.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; [self presentModalViewController:More animated:YES]; [More release]; } 
+6
source share
4 answers

There is no full page curl version for UIModalTransitionStyle .

If this is what you need, you must implement it manually yourself. This is more complicated than a simple modal representation controller, but doable.

This code is disabled, only works in the default layout and needs to be customized for your needs. But I hope this gives you an idea of ​​what you need to do:

 UIView* view = viewController.view; view.frame = self.view.window.bounds; [UIView transitionWithView:self.view.window duration:0.2 options:UIViewAnimationOptionTransitionCurlUp animations:^(void) { [self.view.window addSubview:view]; } completion:^(BOOL finished) { [viewController.view removeFromSuperview]; [viewController presentModalViewController:viewController animated:NO]; }]; 
+3
source

Check out the UICatalog code in the Apple Developer Library. Link here: http://developer.apple.com/library/ios/#samplecode/UICatalog/Introduction/Intro.html

When you run it, select "Transitions" from the UITableView. See the "Curl Image" button action. If this is what you need ...

You will find the curlAction: method in the TransitionViewController class. Basically, it has two images in a view. Based on which one is displayed and what the previous transition was (curl or curl), it displays another image in such a way that it looks as if you are curling a page up and then folding it. The image of the curl image completely disappears. I am sure you can adapt it to the user interface.

Pretty much the same as PeyloW, only responds to using the old setAnimation: commitAnimation pair.

+4
source

PeyloW and xs2bush excellent recommendations will definitely give you full page curl. I suspect that you are after a more than partial and less complete page of curls. I don't think there is an API for this, but what about a trick that might work?

Use the PeyloW or xs2bush method, but also start a timer with a duration slightly shorter than the duration of the UIViewAnimationOptionTransitionCurlUp animation.

When the timer expires, freeze the animation and remove it from the UIView , which will UIView up:

 curledView.frame = [[curledView.layer presentationLayer] frame]; [curledView.layer removeAllAnimations]; 

Hope this will give you the desired effect.

+1
source

I would use PeyloW's answer, but there is another way. Add a UIView to the modal view that you are going to present (in viewDidLoad), and place it in the upper left corner and give it backgroundColor [UIColor clearColor] . Thus, the view will not be displayed on the screen, but the transition to the flap of the page will be forced to turn off the screen in order to "show" the upper left corner.

+1
source

Source: https://habr.com/ru/post/892291/


All Articles