开发者

Help getting dataSource working on OpenFlow

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 rea开发者_StackOverflow中文版lized 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.


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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜