{"id":20620778,"url":"https://github.com/irons163/irtabbedpageviewcontroller","last_synced_at":"2025-03-06T23:09:53.912Z","repository":{"id":56915169,"uuid":"196529698","full_name":"irons163/IRTabbedPageViewController","owner":"irons163","description":"IRTabbedPageViewController is a powerful tab view controller for iOS.","archived":false,"fork":false,"pushed_at":"2019-12-23T03:09:54.000Z","size":115,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-17T17:39:04.195Z","etag":null,"topics":["ios","objective-c","tabbarcontroller","tabbarviewcontroller","tabview-controller"],"latest_commit_sha":null,"homepage":"","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/irons163.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":"2019-07-12T07:21:32.000Z","updated_at":"2019-12-31T05:14:39.000Z","dependencies_parsed_at":"2022-08-21T03:50:34.825Z","dependency_job_id":null,"html_url":"https://github.com/irons163/IRTabbedPageViewController","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irons163%2FIRTabbedPageViewController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irons163%2FIRTabbedPageViewController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irons163%2FIRTabbedPageViewController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irons163%2FIRTabbedPageViewController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/irons163","download_url":"https://codeload.github.com/irons163/IRTabbedPageViewController/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242298970,"owners_count":20104922,"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","tabbarcontroller","tabbarviewcontroller","tabview-controller"],"created_at":"2024-11-16T12:15:37.598Z","updated_at":"2025-03-06T23:09:53.890Z","avatar_url":"https://github.com/irons163.png","language":"Objective-C","readme":"![Build Status](https://img.shields.io/badge/build-%20passing%20-brightgreen.svg)\n![Platform](https://img.shields.io/badge/Platform-%20iOS%20-blue.svg)\n\n# IRTabbedPageViewController \n\n- IRTabbedPageViewController is a powerful tab view controller for iOS.\n\n## Features\nIRTabbedPageViewController is a UIViewController that provides a simple to implement page view controller with scrolling tab bar. It also includes a UIPageViewController wrapper that provides improved data source and delegation methods.\n\n## Install\n### Git\n- Git clone this project.\n- Copy this project into your own project.\n- Add the .xcodeproj into you  project and link it as embed framework.\n#### Options\n- You can remove the `demo` and `ScreenShots` folder.\n\n### Cocoapods\n- Add `pod 'IRTabbedPageViewController'`  in the `Podfile`\n- `pod install`\n\n## Usage\n\n### Basic\n\nTo use the tabbed page view controller, simply create a `UIViewController` that is a subclass of `IRTabbedPageViewController`. Then implement the following data source method:\n\n```obj-c\n// array of view controllers to display in page view controller\n- (NSArray *)viewControllersForPageViewController:(IRPageViewController *)pageViewController;\n```\n\nIf you are using a `UINavigationController` (As shown in Example project) you can embed the tab bar in the navigation bar. Simply set the `UINavigationBar` class in the navigation controller to `IRTabNavigationBar` and the navigation bar will attach to the view controller.\n\nTo manually attach a tab bar view to the `IRTabbedPageViewController`:\n\n- Set the `tabBarView` property of the `IRTabbedPageViewController` to an `IRTabBarView` instance (Note: `tabBarView` is weak and an `IBOutlet`).\n- Set the `dataSource` and `delegate` properties of the `IRTabBarView` instance to the `IRTabbedPageViewController` (Both are `IBOutlet`able).\n\nTo customise the content of the tabs in the tab bar override the following:\n\n```obj-c\n- (void)tabBarView:(IRTabBarView *)tabBarView\n       populateTab:(IRTabBarCollectionViewCell *)tab\n           atIndex:(NSInteger)index;\n```\n\n### Advanced settings\n\nIRPageViewController is a UIViewController wrapper for UIPageViewController that provides a simpler data source and enhanced delegation methods. The data source methods are encapsulated in the `IRTabbedPageViewControllerDataSource` as seen above.\n\nThe delegate methods that `IRPageViewControllerDelegate` provides are listed below:\n\n```obj-c\n- (void)pageViewController:(IRPageViewController *)pageViewController\n     didScrollToPageOffset:(CGFloat)pageOffset\n                 direction:(IRPageViewControllerScrollDirection)scrollDirection;\n```\nCalled when the page view controller is scrolled by the user to a specific offset, similar to `scrollViewDidScroll`. The pageOffset maintains the current page position and a scroll direction is provided.\n\n```obj-c\n- (void)pageViewController:(IRPageViewController *)pageViewController\n           didScrollToPage:(NSInteger)page;\n```\nCalled when the page view controller completes a full scroll to a new page.\n\n### Appearance\n`IRTabBarView` provides properties for appearance customisation, including:\n- `sizingStyle` - Whether the tab bar should size to fit or equally distribute its tabs.\n- `tabStyle` - The styles to use for tabs:\n    - `IRTabStyleText` for text.\n    - `IRTabStyleImage` for images.\n    - `IRTabStyleImageAndText` for images and text.\n    - `IRTabStyleCustomView` for custom view.\n- `indicatorStyle` - The style to use for the current tab indicator.\n- `indicatorAttributes` - Appearance attributes for current tab indicator.\n- `tabAttributes` - Appearance attributes for tabs.\n- `selectedTabAttributes` - Appearance attributes for the selected tab.\n- `selectionIndicatorTransitionStyle` - The transition style for the selection indicator.\n - `IRTabTransitionStyleProgressive` to progressively transition between tabs.\n - `IRTabTransitionStyleSnap` to snap between tabs during transitioning.\n - use `setTransitionStyle:` to set both the `selectionIndicatorTransitionStyle` and `tabTransitionStyle`.\n- `tabTransitionStyle` - The transition style to use for the tabs.\n\n#### Custom Tab Style\nSet custom tab view in the `IRTabBarViewDataSource`.\n\n```obj-c\n#pragma mark - IRTabBarViewDataSource\n- (void)tabBarView:(IRTabBarView *)tabBarView populateTab:(IRTabBarCollectionViewCell *)tab atIndex:(NSInteger)index {\n    tab.customView = YOUR_CUSTOM_TAB_VIEW;\n}\n```\n\n## Screenshots\n ![Demo](./ScreenShots/demo1.png) \n\n## Copyright\n##### This project is inspired from [MSSTabbedPageViewController](https://github.com/msaps/MSSTabbedPageViewController).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firons163%2Firtabbedpageviewcontroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Firons163%2Firtabbedpageviewcontroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firons163%2Firtabbedpageviewcontroller/lists"}