Skip to content

Have you tried the demo? Empty views after a few scroll #3

@CaledoniaProject

Description

@CaledoniaProject

I tried the code but there're empty views after a few horizontal scrolls, so I copied the classes and tested in another project, same problem:

    NSInteger numberOfViews = 3;
    for (int i = 0; i < numberOfViews; i++)
    {
        CGFloat xOrigin = i * self.view.frame.size.width;
        UIImageView *awesomeView = [[UIImageView alloc] initWithFrame:
                                    CGRectMake(xOrigin, 0, self.tableView.frame.size.width, 100)];
        [awesomeView setImage: [UIImage imageNamed:@"ad-1"]];
        [self.scrollView addSubview:awesomeView];
    }
    self.scrollView.contentSize = CGSizeMake(self.tableView.frame.size.width * numberOfViews, 100);

FYI this is the header view of a table ..

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