Iphone PageCurlTransition 就像一本书?
嘿,我想像在书中那样进行页面卷曲过渡,当我按下一个按钮时就会卷曲,我想在下一页进行过渡时看到。 对于卷曲,我希望过渡视图位于下一页。就像我移动书中的页面一样。 转换工作正常,但问题是我希望在转换完成时执行我的指令。 问题是 mywebview 在转换完成后加载文本。这是我的转换代码:
[UIViewtransitionWithView:self.view 持续时间:1.0 选项:UIViewAnimationOptionTransitionCurlUp 动画:^{ [self.theWebView loadHTMLString:text baseURL:nil]; 完成:NULL ];
即使我在转换之前放置了 loadHtmlString 命令,它也不会像我想要的那样工作。
[UIViewtransitionFromView:mycurentview 查看:我的下一个视图 持续时间:1.0 选项:UIViewAnimationOptionTransitionCurlUp 完成:无 }
我已经尝试过了,但它没有制作动画。它从一个视图切换到另一个视图,没有动画。
Hy, i want to make a pagecurltransition like in a book, when i press one button is curlup and i want to see while the transition is beeing made the next page.
And for curldown i want the transition view to be with the next page. Like when i move pages in a book.
The transition works fine but the problem is that i want my instruction to be executed while the transition is beeing done.
The problem is that mywebview loads the text after the transition is done. Here is the code for my transition:
[UIView transitionWithView:self.view duration:1.0 options: UIViewAnimationOptionTransitionCurlUp animations:^{ [self.theWebView loadHTMLString:text baseURL:nil]; completion:NULL ];
Even if i put the loadHtmlString command before transition it doesn't work like i want.
[UIView transitionFromView:mycurentview toView:mynextview duration:1.0 options:UIViewAnimationOptionTransitionCurlUp completion:nil }
I've tried this but it doesn't make the animation. It changes from view to view with out animation.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
github上有很多页面动画框架。这是一个很好的:
https://github.com/ole/leaves
There are a number of page animation frameworks on github. Here is a good one:
https://github.com/ole/leaves
我最后的回答很愚蠢,我为此道歉。我发现新的 UIPageViewController 允许非常出色的页面卷曲。艾丽卡·萨顿 (Erica Sadun) 即将出版一本新书,其中包含有关此方面的章节。她的测试代码在这里,看看第5章。
My last answer was dumb and I apologize for it. I have found that the new UIPageViewController allows really terrific page curling. Erica Sadun has a new book coming out that includes sections on this. Her test code is here, and look at chapter 5.