Skip to content

Scrolling issue #27

Description

@guninia

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions