Latest 1.1.1
License MIT
Platforms ios 5.0, requires ARC

Build Status
Cocoapods Version
[CocoaPods Platform]()

PunchScrollView is a little UIScrollView subclass for iOS which works like UICollectionView or UITableView Frameworks.

Easy and fast implementation: delegate, dataSource methods and getter are similar to the UITableView.
Use the benefits of the NSIndexPath pattern like you already know it from UITableView or UICollectionView.
This allows an easy setup in combination with Core Data.

  • Helpful methods, i.e. jump or scroll to a desired page
  • Avoid boilerplate code
  • Save lots of memory with automatic dequeuing
  • Comes with an Example project to demonstrate the usage
  • Infinite scrolling

Example setup in the ViewController

self.scrollView = [[PunchScrollView alloc] init];
self.scrollView.delegate = self;
self.scrollView.dataSource = self;
self.scrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[self.view addSubview:self.scrollView];

#pragma mark - PunchScrollViewDataSource

- (NSInteger)numberOfSectionsInPunchScrollView:(PunchScrollView *)scrollView
    return 3;

- (NSInteger)punchscrollView:(PunchScrollView *)scrollView numberOfPagesInSection:(NSInteger)section
    return 3;

- (UIView*)punchScrollView:(PunchScrollView*)scrollView viewForPageAtIndexPath:(NSIndexPath *)indexPath
    ExamplePageView *page = (ExamplePageView*)[scrollView dequeueRecycledPage];
    if (page == nil)
      // You could also use PunchScrollview as gallery scrollview - just change the size of the desired view
        page = [[ExamplePageView alloc] initWithFrame:self.view.bounds];
        page.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;

    page.titleLabel.text = [NSString stringWithFormat:@"Page %@ in section %@", @(indexPath.row), @(indexPath.section)];

    return page;


  • Right now there is an issue when turning to landscape since iOS 8 with infinite scrolling (only in rare cases). Layouting is not right for the visible page.

Latest podspec

    "name": "PunchScrollView",
    "version": "1.1.1",
    "summary": "PunchScrollView is a little UIScrollView subclass.",
    "description": "                   PunchScrollView is a little UIScrollView subclass which works like the UICollectionView but with more focus on pages and infinite scrolling. PunchScrollView can be run with iOS 5.n",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Christian Menschel": "[email protected]"
    "social_media_url": "",
    "platforms": {
        "ios": "5.0"
    "source": {
        "git": "",
        "tag": "1.1.1"
    "source_files": "PunchScrollView.{h,m}",
    "requires_arc": true

Pin It on Pinterest

Share This