Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reloading the OpenFlow #3

Open
voodie99 opened this issue Dec 22, 2009 · 6 comments
Open

Reloading the OpenFlow #3

voodie99 opened this issue Dec 22, 2009 · 6 comments

Comments

@voodie99
Copy link

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
Copy link

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
Copy link

micurley commented Oct 1, 2010

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
Copy link

mpbod commented Dec 20, 2010

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
Copy link

ghost commented Jun 21, 2011

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
Copy link

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

@druidLike
Copy link

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

}
`

.-><-.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants