帮助让数据源在 OpenFlow 上运行

发布于 2024-08-09 09:48:36 字数 649 浏览 7 评论 0 原文

我需要帮助在 OpenFlow 中获取数据源。我

想在手机水平转动时提供 CoverFlow 功能。我正在使用 Alex Fajkowski 的出色代码 OpenFlow ( http://fajkowski.com/blog/2009/08/02/openflow-a-coverflow-api-replacement-for-the-iphone/ )但提供的示例与我需要什么。

我在导航栏视图控制器内的水平视图中使用 OpenFlow。我已经让 OpenFlow 工作了。我可以滚动浏览所有图像并且效果非常好。然而,我用它来处理 100 多张图像,一开始加载需要一段时间。在研究性能改进时,我意识到 AFOpenFlowViewDataSource 委托没有被调用。我能够通过在视图控制器类“flowView.dataSource = self;”中指定委托来使 AFOpenFlowViewDelegate 工作。但我无法让数据源委托工作。即使使用“flowView.viewDelegate = self;”也不行。

是否需要数据源?看来加载线程需要它。

I need help getting dataSource in OpenFlow. I

I want to provide CoverFlow functionality whenever the phone is turned horizontally. I'm using Alex Fajkowski's awesome code OpenFlow ( http://fajkowski.com/blog/2009/08/02/openflow-a-coverflow-api-replacement-for-the-iphone/ ) but the example provided is very different than what I need.

I am using OpenFlow in a horizontal view inside a navbar view controller. I have OpenFlow working already. I can scroll through all my images and works really good. However I am using it with over 100 images and it takes a while to load at first. In looking into performance improvements I realized the AFOpenFlowViewDataSource delegate is not getting called. I was able to get AFOpenFlowViewDelegate working by specifying the delegate in the view controller class "flowView.dataSource = self;". But I am not able to get the datasource delegate working. Not even with "flowView.viewDelegate = self;".

Is the datasource needed at all? It seems it is needed for threading of loading.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

記柔刀 2024-08-16 09:48:36

好吧,看起来现在运行得很漂亮。仅当动态加载对象时才调用 DataSource 委托。意思是,如果我使用“[(AFOpenFlowView *)self.view setImage]”,那么 dataSOurce 永远不会被调用,因为它知道的所有图像都已加载。但是,使用“[(AFOpenFlowView *)self.view setNumberOfImages:30];”会触发 DataSource 委托根据需要加载图像。我发现 GetImageOperation NSThread 对于我的 100 多张图像非常有用。但是,图像在离开屏幕后不会被卸载。有人知道如何在图像离开屏幕时将其卸载吗?

Ok, it looks like it is running beautiful now. The DataSource delegate is only called when there the objects are loaded dynamically. Meaning, if I use "[(AFOpenFlowView *)self.view setImage]" then dataSOurce is never called because all it knows images are already loaded. However, using "[(AFOpenFlowView *)self.view setNumberOfImages:30];" triggers the DataSource delegate to load the images as they are needed. I found the GetImageOperation NSThread very useful for my 100+ images. However, images are not unloaded after going offscreen. Anyone know how to unload images as they go off screen?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文