OpenFlow icon indicating copy to clipboard operation
OpenFlow copied to clipboard

Reloading the OpenFlow

Open voodie99 opened this issue 15 years ago • 6 comments

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

voodie99 avatar Dec 22 '09 00:12 voodie99

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?

mefistody avatar Jul 16 '10 11:07 mefistody

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

micurley avatar Oct 01 '10 23:10 micurley

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.

mpbod avatar Dec 20 '10 16:12 mpbod

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];
}

ghost avatar Jun 21 '11 19:06 ghost

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

SrinivasG avatar Sep 12 '11 06:09 SrinivasG

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

`

  • (void) RefreshAllVisible {

    int lowerBound = MAX(-1, selectedCoverView.number - COVER_BUFFER);
    int upperBound = MIN(self.numberOfImages - 1, selectedCoverView.number + COVER_BUFFER);
    
    [self layoutCovers:selectedCoverView.number fromCover:lowerBound toCover:upperBound];
    [self centerOnSelectedCover:YES];
    

} `

.-><-.

druidLike avatar Jun 11 '12 05:06 druidLike