{"id":19318782,"url":"https://github.com/appscomtr/apfancypager","last_synced_at":"2025-04-22T17:31:18.925Z","repository":{"id":56900871,"uuid":"152418111","full_name":"AppsComTr/APFancyPager","owner":"AppsComTr","description":"A fancy pager view controller framework for Swift/Objective-C","archived":false,"fork":false,"pushed_at":"2019-05-03T11:30:22.000Z","size":16103,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-14T01:37:34.464Z","etag":null,"topics":["carthage","cocoapods","pager","swift","viewpager"],"latest_commit_sha":null,"homepage":"https://appscomtr.github.io/APFancyPager/","language":"Swift","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/AppsComTr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-10T12:13:50.000Z","updated_at":"2023-05-19T04:24:01.000Z","dependencies_parsed_at":"2022-08-21T02:20:39.115Z","dependency_job_id":null,"html_url":"https://github.com/AppsComTr/APFancyPager","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppsComTr%2FAPFancyPager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppsComTr%2FAPFancyPager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppsComTr%2FAPFancyPager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppsComTr%2FAPFancyPager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AppsComTr","download_url":"https://codeload.github.com/AppsComTr/APFancyPager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250287509,"owners_count":21405628,"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":["carthage","cocoapods","pager","swift","viewpager"],"created_at":"2024-11-10T01:19:38.197Z","updated_at":"2025-04-22T17:31:13.914Z","avatar_url":"https://github.com/AppsComTr.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# APFancyPager\nA fancy pager view controller framework for Swift/Objective-C\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/88b5da03f40f4b1daf7f14343606a998)](https://app.codacy.com/app/mertsimsek/APFancyPager?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=AppsComTr/APFancyPager\u0026utm_campaign=Badge_Grade_Dashboard)\n[![Build Status](https://travis-ci.org/AppsComTr/APFancyPager.svg?branch=master)](https://travis-ci.org/AppsComTr/APFancyPager)\n[![Platform](https://img.shields.io/cocoapods/p/APFancyPager.svg)](https://github.com/AppsComTr/APFancyPager)\n[![CocoaPods](https://img.shields.io/cocoapods/v/APFancyPager.svg)](https://cocoapods.org/pods/APFancyPager)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![License](http://img.shields.io/cocoapods/l/APFancyPager.svg)](https://raw.githubusercontent.com/AppsComTr/APFancyPager/master/LICENSE)\n\n## Installation\n\n### Cocoapods\nSimply add the APFancyPager to your Podfile:\n\n`pod 'APFancyPager'`\n\n### Carthage\nYou can use Carthage as well. Paste below line to your Cartfile:\n`github \"AppsComTr/APFancyPager\"`\n\n### Manual\nAlso, you can copy-paste the Swift files directly into your project.\n\n## Usage\n\nYou can check the demo project to get the basics of the framework.\n\nSimply make your view controller extend APFancyPagerViewController and also implement the data source and optionally the delegate.\n\nYou should use the below data source function in order to specify the number of pages that APFancyPager will show.\n```swift\nfunc numberOfViewControllers(in fancyPagerViewController: APFancyPagerViewController) -\u003e Int {\n        return pages.count\n}\n```\n\nAlso you should return your desired header height from the data source function below.\n\n```swift\nfunc heightForHeader(_ fancyPagerViewController: APFancyPagerViewController) -\u003e CGFloat {\n        return 100.0\n}\n```\n\nYou should return related view controller into pages by using\n```swift\nfunc fancyPagerViewController(_ fancyPagerViewController: APFancyPagerViewController, viewControllerForIndex index: Int) -\u003e UIViewController\n```\nJust return your view controller for related index.\n\nYou want to show header titles for your fancy pager, don't you? Here, use below data source function o achieve this:\n```swift\nfunc fancyPagerViewController(_ fancyPagerViewController: APFancyPagerViewController, headerStringForIndex index: Int) -\u003e String\n```\n\nFor the text color of the header at index this:\n\n```swift\nfunc fancyPagerViewController(_ fancyPagerViewController: APFancyPagerViewController, headerTextColorForIndex index: Int) -\u003e UIColor\n```\n\nand for the background color at index, this:\n\n```swift\nfunc fancyPagerViewController(_ fancyPagerViewController: APFancyPagerViewController, headerBackgroundColorForIndex index: Int) -\u003e UIColor\n```\n\nThere are 2 delegate functions which are\n```swift\nfunc fancyPagerViewController(_ fancyPagerViewController: APFancyPagerViewController, didScrollToIndex index: Int)\n```\nand\n```swift\nfunc fancyPagerViewController(_ fancyPagerViewController: APFancyPagerViewController, isScrollingFromIndex fromIndex: Int, toIndex: Int, progress: CGFloat)\n```\nYou can use them to get some useful (maybe not useful that much) informations about the APFancyPager.\n\nThe last but not least, you can use an extra function to scroll the APFancyPager to the any index directly. To achieve this, simply use below function:\n\n```swift\nfunc scrollToPage(_ pageNumber: Int, animated: Bool)\n```\n\n## Preview\n\u003cimg src=\"https://raw.githubusercontent.com/AppsComTr/APFancyPager/master/docs/appvideo.gif\" width=\"200\"\u003e\n\n## License\nAPFancyPager is released under the MIT license. See [LICENSE](https://github.com/AppsComTr/APFancyPager/blob/master/LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappscomtr%2Fapfancypager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappscomtr%2Fapfancypager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappscomtr%2Fapfancypager/lists"}