Open voodie99 opened 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?
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
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.
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];
}
What would be the implementation for layoutCoversAnimated:NO, and Iam unable to check the method implementation for numberOfImagesInOpenFlowView:self
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];
} `
.-><-.
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