如何使用不同的视图控制器创建封面流?
我想将视图控制器的视图显示为图块中的图像。但是如何在加载这些视图控制器之前获取所有视图控制器的图像。建议我一些解决方案。我正在浏览链接 Flowcover
编辑
但我的观点有图表,它是从动态内容中提取的(从网络服务中获取)。如何在不加载视图的情况下截取屏幕截图?如果没有,你可以建议我一些其他的解决方案来显示在“图块”中。
I want to show view controllers's view as images in tiles. But how to get the images of all view controllers before loading those view controllers. Suggest me some solution. I was looking through the link Flowcover
EDIT
But My views have graphs, which is drawn from a dynamic content(fetched from web service). How could I take a screenshot without loading the view? If not, can u suggest me some other solution to display in 'tiles'.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用视图控制器作为图像是不可能的,但您可以以图表方式截取视图的屏幕截图并在封面流程中使用它。我也使用了这个技巧并作为魅力工作。
谢谢
Use view controller as a image is not possible but you can take diagrammatically screen shot of ur view and use it in cover flow. i also used this trick and work as a charm.
Thx
我这样做的方法是在 OpenGL 中编写封面流程并使用 viewController 视图构建纹理。当每个视图控制器到达前面时,您可以将其视图绘制在 OpenGL 场景的顶部,以便用户可以与其交互。当用户再次移动封面流时,此 UIView 被隐藏,他们将再次查看 viewController 的纹理“快照”。
The way I did this was to write the cover flow in OpenGL and build textures using the viewController views. When each view controller comes to the front, you can draw its view over the top of your OpenGL scene so that the user can interact with it. When the user moves the coverflow again, this UIView is hidden and they will once again be looking at a texture 'snapshot' of the viewController.
您可以在已隐藏的视图中加载控件或图表。然后在程序中截取屏幕截图并使用该图像进行纹理绘制。
You can load your controls or graphs in a view which is already hidden. then take a screen screen shot in program and use that image for texture drawing.