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

Scrolling issue #27

Open
guninia opened this issue Feb 20, 2012 · 0 comments
Open

Scrolling issue #27

guninia opened this issue Feb 20, 2012 · 0 comments

Comments

@guninia
Copy link

guninia commented Feb 20, 2012

I've integrated the AFOpenFlowView into my project and works fine,
but when I stop running, and simply change the "openFlowView.frame.origin.y" value, the weird thing happened.

For example,
First, I set the frame as follows:
AFOpenFlowView *openFlowView = [[AFOpenFlowView alloc] initWithFrame:CGRectMake(0.0, 50, self.view.frame.size.width, 200)];
everything works fine.

than I set the frame as follows:
AFOpenFlowView *openFlowView = [[AFOpenFlowView alloc] initWithFrame:CGRectMake(0.0, 200, self.view.frame.size.width, 200)];

I can only scroll the cover in a small area which is 50 points height from top of the openFlowView.

I've tried several y value to test it, and it seems that there would be a boundary at y = 250, which I set for the first time "y = 50 and height = 200". The bottom position of the openFlowView is 50 + 200 = 250.
Only the area higher than y = 250 and lower than current openFlowView top position is scrollable.
That means, If I change the openFlowView y value larger than 250, I can't scroll it any more.

Here is my code:
startY = 50.0;
AFOpenFlowView *openFlowView = [[AFOpenFlowView alloc] initWithFrame:CGRectMake(0.0, startY, self.view.frame.size.width, 200)];
[openFlowView setDataSource:self];
[openFlowView setViewDelegate:self];
[openFlowView setNumberOfImages:[categoryArray count]];
for (int imageIndex = 0; imageIndex < [categoryArray count]; imageIndex++)
{
UIImage *image = [UIImage imageNamed:[[categoryArray objectAtIndex:imageIndex] objectForKey:@"imageName"]];
if (image == nil)
{
image = [UIImage imageNamed:@"Placeholder"];
}
[openFlowView setImage:image forIndex:imageIndex];
}
[openFlowView setSelectedCover:([categoryArray count] / 2)];
[openFlowView centerOnSelectedCover:NO];
[self.view addSubview:openFlowView];

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

1 participant