thefaj / OpenFlow

CoverFlow API replacement for the iPhone
http://apparentlogic.com/openflow
818 stars 158 forks source link

Reloading the OpenFlow #3

Open voodie99 opened 14 years ago

voodie99 commented 14 years ago

Can you provide a method for clearing AFOpenFlowView images without needing to release and re-instantiate programmatically? e.g after you display Flicker image library and you want to search something else without closing and opening application

mefistody commented 14 years ago

any luck with this? I've been trying like crazy and no luck. i can't even release it and re-instantiate without crashing? how do you do it?

micurley commented 14 years ago

I was running into this problem also - my workaround for now is to release the viewcontroller that contains the openflow instance and re-instantiate - so far it is working pretty well

mpbod commented 13 years ago

I had the same problem, but I'm using a different fork, https://github.com/tupps/OpenFlow. I forked that and made some fixes. For me the problem was after I call reloadData, all the covers disappeared. I don't have time to fix that now, but I used setSelectedCover: to make it come back again. You can check out my fork if it helps. Cheers.

ghost commented 13 years ago

Here's my reloadData, it seems to work fine for me. Hope it helps.

- (void)reloadData {
    for(id key in onscreenCovers) {
        AFItemView *cover = [onscreenCovers objectForKey:key];
        [cover.layer removeFromSuperlayer];
    }

    [coverImages removeAllObjects];
    [coverImageHeights removeAllObjects];
    [offscreenCovers removeAllObjects];
    [onscreenCovers removeAllObjects];

    lowerVisibleCover = upperVisibleCover = -1;
    selectedCoverView = nil;

    self.defaultImage = [self.dataSource defaultImage];
    self.numberOfImages = [self.dataSource numberOfImagesInOpenFlowView:self];

    [self layoutCoversAnimated:NO];
}
SrinivasG commented 13 years ago

What would be the implementation for layoutCoversAnimated:NO, and Iam unable to check the method implementation for numberOfImagesInOpenFlowView:self

druidLike commented 12 years ago

This helped me remove some artifacts after swapping out image sets :)

`

} `

.-><-.