UIViewAnimationTransitionCurlUp working horizontally

I try to make the UIViewAnimationTransitionCurlUp work horizontally so, I rotate the view where the animation is applied. But the didn't work, the animation stay from the bottom to the top. Any idea?

first = [[PDFPortraitView alloc] initWithFrame:CGRectMake(0, 0, 960, 768) andCurrentPage:currentPage]; container = [[UIView alloc] initWithFrame:CGRectMake(-96, 140, 960, 768)]; container.backgroundColor = [UIColor redColor]; container.transform = CGAffineTransformMakeRotation(M_PI * (0.5)); [self.view addSubview:container]; [container addSubview:first]; second = [[PDFPortraitView alloc] initWithFrame:CGRectMake(0, 0, 960, 768) andCurrentPage:currentPage]; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:1.5f]; [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:container cache:NO]; [first removeFromSuperview]; [container addSubview:second]; [UIView commitAnimations];

--------------Solutions-------------

Try applying a 90 degree rotation to your view's superview's transform. That should transform your view's coordinate space, so a curl transition applied to the child view should curl in rotated coordinates.

You might have to create multiple views to keep your content from being rotated:

outer view, rotated 90 degrees.

middle view - this is the view that gets the curl transition

inner view, rotated -90 degrees, and containing your actual content.

I haven't tried it, but that should work.

Note that the view you switch to will have to be a middle view/inner view combo.

Category:ios Time:2011-08-26 Views:2

Related post

  • How can I control UIViewAnimationTransitionCurlUp effect direction? 2010-10-27

    There are two viewControllers in my project, and one is the main controller. Another is its subview controller used for inserting into the main controller. I set the controller translate animation with UIViewAnimationTransitionCurlUp, the subView is

  • Slide textview horizontal without using paging 2011-03-09

    I`m using a simple Textview in an tabbased application to display some text :) I figerd out how to change the text animated using the following code: - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObje

  • .Net Compact Framework scrollbars - horizontal always show when vertical shows 2008-08-27

    I am new to the .Net Compact Framework and have been unable to find an answer via Google. Gasp! Yes, it's true, but that is part of why stackoverflow is here, right? I have a form that is longer than the screen, so a vertical scrollbar appears as exp

  • CSS - Make divs align horizontally 2008-08-31

    I have a container div with a fixed width and height, with overflow: hidden. I want a horizontal row of float: left divs within this container. Divs which are floated left will naturally push onto the 'line' below after they read the right bound of t

  • What's a good bit of JS or JQuery for horizontally scrolling news ticker 2008-09-03

    I am looking for a little bit of JQuery or JS that allows me to produce a horizontally scrolling "news ticker" list. The produced HTML needs to be standards compliant as well. I have tried liScroll but this has a habit of breaking (some content ends

  • Can you recommend a database that scales horizontally? 2008-09-03

    Generally the database server is the biggest, most expensive box we have to buy as scaling vertically is the only option. Are there any databases that scale well horizontally (i.e. across multiple commodity machines) and what are the limitations in t

  • Add horizontal scroll to asp.net listbox control 2008-09-05

    How can I add horizontal scroll capabilities to the asp.net listbox control? --------------Solutions------------- We can put this list box inside a DIV and set the style for DIV to overflow which will automatically show the scroll bar whenever necess

  • Practical solution to center vertically and horizontally in HTML that works in FF, IE6 and IE7 2008-09-08

    What can be a practical solution to center vertically and horizontally content in HTML that works in Firefox, IE6 and IE7? Some details: I am looking for solution for the entire page. You need to specify only width of the element to be centered. Heig

  • How do I *really* justify a horizontal menu in HTML+CSS? 2008-09-08

    You find plenty of tutorials on menu bars in HTML, but for this specific (though IMHO generic) case, I haven't found any decent solution: # THE MENU ITEMS SHOULD BE JUSTIFIED JUST AS PLAIN TEXT WOULD BE # # ^ ^ # There's an varying number of text-onl

  • Dreaded iframe horizontal scroll bar can't be removed in IE? 2008-09-15

    I have an iframe. The content is wider than the width I am setting so the iframe gets a horizontal scroll bar. I can't increase the width of the iframe so I want to just remove the scroll bar. I tried setting the scroll property to "no" but that kill

  • In Visual Studio 2008, is it possible to mix vertical tab groups with horizontal tab groups? 2008-09-16

    I have a 1920x1200 screen an would like to customize VS2008 code windows to have some areas split vertically and horizontally (tab groups). I can only seem to do all vertical or all horizontal in VS2008. Is there any crafty way of getting a mixing bo

  • Horizontal lines when clicking the button in Firefox 2008-09-30

    I've some CSS problem in Firefox 3. I have several image buttons on my page and when I'm clicking on them I've seen to horizontal lines across the screen at top and bottom button border. I saw such issue on other web sites, so I think it's something

  • How do I stop a UIScrollView from bouncing horizontally? 2008-10-06

    I have a UIScrollView that shows vertical data, but where the horizontal component is no wider than the screen of the iPhone. The problem is that the user is still able to drag horizontally, and basically expose blank sections of the UI. I have tried

  • How can I disable horizontal scrollbars in Flex components? 2008-10-15

    I have a few GridItem components that gets filled with dynamic data. Sometimes this data longer than the GridItem's fixed width, causing the GridItem to get a horizontal scrollbar. How can I disable this (I'm assuming you can...) Is there a general s

  • jQuery.ScrollTo / jQuery.SerialScroll Horizontal Scrolling 2008-10-17

    I am looking to implement horizontal scrolling using jQuery.SerialScroll (based on jQuery.ScrollTo). I currently have a continuous horizontal scrolling working with liScroll as I discuss in this post. However, now I need discrete scrolling and I have

  • Is it possible to have a bottom footer with a horizontal scrollbar and no vertical scroll bar? 2008-10-17

    I have a layout which uses min-width and works great. So I came to add a footer which I want to stick to the bottom. Firefox will display everything perfectly while with IE, when min-width takes in effect and the vertical scroll bar kicks in, the hor

  • wxpython - Expand list control vertically not horizontally 2008-10-18

    I have a ListCtrl that displays a list of items for the user to select. This works fine except that when the ctrl is not large enough to show all the items, I want it to expand downwards with a vertical scoll bar rather than using a horizontal scroll

  • How do I align spans or divs horizontally? 2008-10-22

    My only problem is making them line up three-across and have equal spacing. Apparently, spans can not have width and divs (and spans with display:block) don't appear horizontally next to each other. Suggestions? <div style='width:30%; text-align:c

  • Disable browsers vertical and horizontal scrollbars 2008-10-28

    Is it possible to disable the browsers vertical and horizontal scrollbars using jQuery or javascript? --------------Solutions------------- In case you need possibility to hide and show scrollbars dynamically you could use $("body").css("overflow", "h

Copyright (C) pcaskme.com, All Rights Reserved.

processed in 0.522 (s). 13 q(s)