{"id":21415313,"url":"https://github.com/wibosco/insightfulpager","last_synced_at":"2026-03-14T08:39:54.976Z","repository":{"id":42443294,"uuid":"50115283","full_name":"wibosco/InsightfulPager","owner":"wibosco","description":"InsightfulPager is a more chatty alternative to UIPageViewController","archived":false,"fork":false,"pushed_at":"2022-07-22T07:57:52.000Z","size":52,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-18T04:11:59.750Z","etag":null,"topics":["ios","objective-c","uipageviewcontroller"],"latest_commit_sha":null,"homepage":"https://williamboles.com/","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wibosco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-21T15:07:00.000Z","updated_at":"2022-07-20T20:50:42.000Z","dependencies_parsed_at":"2022-08-28T16:51:36.662Z","dependency_job_id":null,"html_url":"https://github.com/wibosco/InsightfulPager","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wibosco%2FInsightfulPager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wibosco%2FInsightfulPager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wibosco%2FInsightfulPager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wibosco%2FInsightfulPager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wibosco","download_url":"https://codeload.github.com/wibosco/InsightfulPager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225950165,"owners_count":17550296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ios","objective-c","uipageviewcontroller"],"created_at":"2024-11-22T18:46:51.362Z","updated_at":"2026-03-14T08:39:54.905Z","avatar_url":"https://github.com/wibosco.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Version](https://img.shields.io/cocoapods/v/InsightfulPager.svg?style=flat)](http://cocoapods.org/pods/InsightfulPager)\n[![License](https://img.shields.io/cocoapods/l/InsightfulPager.svg?style=flat)](http://cocoapods.org/pods/InsightfulPager)\n[![Platform](https://img.shields.io/cocoapods/p/InsightfulPager.svg?style=flat)](http://cocoapods.org/pods/InsightfulPager)\n\u003ca href=\"https://twitter.com/wibosco\"\u003e\u003cimg src=\"https://img.shields.io/badge/twitter-@wibosco-blue.svg?style=flat\" alt=\"Twitter: @wibosco\" /\u003e\u003c/a\u003e\n\nInsightfulPager is a more chatty alternative to UIPageViewController.\n\n## Installation via [CocoaPods](https://cocoapods.org/)\n\nTo integrate InsightfulPager into your Xcode project using CocoaPods, specify it in your `Podfile`:\n\n```ruby\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :ios, '8.0'\n\npod 'InsightfulPager'\n```\n\nThen, run the following command:\n\n```bash\n$ pod install\n```\n\n\u003e CocoaPods 0.39.0+ is required to build InsightfulPager.\n\n## Usage\n\n#### Init\n\n```objc\n#import \u003cInsightfulPager/ISPPagingViewController.h\u003e\n\n....\n\n- (ISPPagingViewController *)pagingViewController\n{\n    if (!_pagingViewController)\n    {\n        _pagingViewController = [[ISPPagingViewController alloc] initWithPageViewController:self.pages[0]\n                                                                                   pageSize:self.view.frame.size\n                                                                                 centerPage:NO];\n        \n        self.pagingViewController.dataSource = self;\n        self.pagingViewController.delegate = self;\n    }\n    \n    return _pagingViewController;\n}\n```\n\n#### Adding it as a child viewcontroller\n\n```objc\n#import \u003cInsightfulPager/ISPPagingViewController.h\u003e\n\n....\n\n- (void)viewDidLoad\n{\n    [super viewDidLoad];\n    \n    [self addChildViewController:self.pagingViewController];\n    [self.view addSubview:self.pagingViewController.view];\n    [self.pagingViewController didMoveToParentViewController:self];\n    \n    [self.pagingViewController beginAppearanceTransition:YES\n                                                animated:YES];\n    \n}\n```\n\n#### Possible DataSource implementation\n\n```objc\n#import \u003cInsightfulPager/ISPPagingViewController.h\u003e\n\n....\n\n- (UIViewController *)viewControllerBeforeViewController:(UIViewController *)viewController\n{\n    NSUInteger indexOfFocusedViewController = [self.pages indexOfObject:viewController];\n    \n    ISEPageViewController *viewControllerBeforeViewController = nil;\n    \n    if (indexOfFocusedViewController \u003e 0)\n    {\n        viewControllerBeforeViewController = self.pages[(--indexOfFocusedViewController)];\n    }\n    \n    return viewControllerBeforeViewController;\n}\n\n- (UIViewController *)viewControllerAfterViewController:(UIViewController *)viewController\n{\n    NSUInteger indexOfFocusedViewController = [self.pages indexOfObject:viewController];\n    \n    ISEPageViewController *viewControllerAfterViewController = nil;\n    \n    if (indexOfFocusedViewController \u003c ([self.pages count] - 1))\n    {\n        viewControllerAfterViewController = self.pages[(++indexOfFocusedViewController)];\n    }\n    \n    return viewControllerAfterViewController;\n}\n```\n\n#### Possible Delegate implementation\n\n```objc\n#import \u003cInsightfulPager/ISPPagingViewController.h\u003e\n\n....\n\n- (void)didMoveToViewController:(UIViewController *)toViewController\n             fromViewController:(UIViewController *)fromViewController\n{\n    ISEPageViewController *page = (ISEPageViewController *)toViewController;\n    \n    NSUInteger indexOfViewControllerMovedTo = [self.pages indexOfObject:toViewController];\n    NSUInteger indexOfViewControllerMovedFrom = [self.pages indexOfObject:fromViewController];\n    \n    NSString *direction = nil;\n    \n    if (indexOfViewControllerMovedTo \u003e indexOfViewControllerMovedFrom)\n    {\n        direction = @\"forwards\";\n    }\n    else\n    {\n        direction = @\"backwards\";\n    }\n    \n    page.informationalLabel.text = [NSString stringWithFormat:@\"Moved onto this viewcontroller by scrolling %@\", direction];\n}\n```\n\n#### Less than fullscreen\n\nInsightfulPager allows you to specify different page size so that views outside of the page can be displayed on the screena at the same time. \n\n```objc\n#import \u003cInsightfulPager/ISPPagingViewController.h\u003e\n\n....\n\n- (ISPPagingViewController *)pagingViewController\n{\n    if (!_pagingViewController)\n    {\n    \tCGSize pageSize = CGSizeMake(self.view.frame.size.width,                                                                                        \n                                     self.view.frame.size.height - kISESelectionBarOffset) //kISESelectionBarOffset is a constant float defined else where\n    \n        _pagingViewController = [[ISPPagingViewController alloc] initWithPageViewController:self.pages[0]\n                                                                                   pageSize:pageSize\n                                                                                 centerPage:NO];\n        \n        self.pagingViewController.dataSource = self;\n        self.pagingViewController.delegate = self;\n    }\n    \n    return _pagingViewController;\n}\n```\n\n#### Need the currently shown page\n\nIf you need the currently shown (in-focus) `UIViewController` page you can use the `focusedViewController` property.\n\n\u003e InsightfulPager comes with an [example project](https://github.com/wibosco/InsightfulPager/tree/master/Example/iOS%20Example) to provide more details than listed above.\n\n\u003e InsightfulPager uses [modules](http://useyourloaf.com/blog/modules-and-precompiled-headers.html) for importing/using frameworks - you will need to enable this in your project.\n\n## Found an issue?\n\nPlease open a [new Issue here](https://github.com/wibosco/ConvenientFileManager/issues/new) if you run into a problem specific to InsightfulPager, have a feature request, or want to share a comment. Note that general `UIPageViewController` questions should be asked on [Stack Overflow](http://stackoverflow.com).\n\nPull requests are encouraged and greatly appreciated! Please try to maintain consistency with the existing [code style](https://www.williamboles.com/objective-c-coding-style). If you're considering taking on significant changes or additions to the project, please communicate in advance by opening a new Issue. This allows everyone to get onboard with upcoming changes, ensures that changes align with the project's design philosophy, and avoids duplicated work.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwibosco%2Finsightfulpager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwibosco%2Finsightfulpager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwibosco%2Finsightfulpager/lists"}