{"id":15025373,"url":"https://github.com/robbdimitrov/rdvtabbarcontroller","last_synced_at":"2025-05-14T23:07:26.849Z","repository":{"id":8143068,"uuid":"9562131","full_name":"robbdimitrov/RDVTabBarController","owner":"robbdimitrov","description":"Highly customizable tabBar and tabBarController for iOS","archived":false,"fork":false,"pushed_at":"2022-06-12T07:02:56.000Z","size":461,"stargazers_count":2308,"open_issues_count":36,"forks_count":498,"subscribers_count":72,"default_branch":"master","last_synced_at":"2025-05-14T23:07:17.901Z","etag":null,"topics":["ios","objective-c","tabbar","tabbarcontroller"],"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/robbdimitrov.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":"2013-04-20T09:54:50.000Z","updated_at":"2025-05-12T07:54:58.000Z","dependencies_parsed_at":"2022-07-20T17:08:53.401Z","dependency_job_id":null,"html_url":"https://github.com/robbdimitrov/RDVTabBarController","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbdimitrov%2FRDVTabBarController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbdimitrov%2FRDVTabBarController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbdimitrov%2FRDVTabBarController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbdimitrov%2FRDVTabBarController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robbdimitrov","download_url":"https://codeload.github.com/robbdimitrov/RDVTabBarController/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254243362,"owners_count":22038046,"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","tabbar","tabbarcontroller"],"created_at":"2024-09-24T20:02:12.790Z","updated_at":"2025-05-14T23:07:21.827Z","avatar_url":"https://github.com/robbdimitrov.png","language":"Objective-C","readme":"# RDVTabBarController\n\n[![iPad screenshot](Screenshots/iPad-small.png)](Screenshots/iPad.png)\n\n[![iPhone screenshot](Screenshots/iPhone-small.png)](Screenshots/iPhone.png)\n\n* Supports iPad and iPhone\n* Supports landscape and portrait orientations\n* Can be used inside UINavigationController\n* Customizable badges\n\n## Installation\n\n### CocoaPods\n\nIf you're using [CocoaPods](http://www.cocoapods.org), simply add `pod 'RDVTabBarController'` to your Podfile.\n\n### Drag \u0026 Drop\n\nAdd the items from `RDVTabBarController` directory to your project. If you don't have ARC enabled, you will need to set a `-fobjc-arc` compiler flag on the `.m` source files.\n\n## Example Usage\n\n#### Initialize RDVTabBarController\n\nThe initialization is similar to the one for `UITabBarController`. Create an instance of the `tabBarController` and initialize its `viewControllers`.\n\n```objective-c\nUIViewController *firstViewController = [[RDVFirstViewController alloc] init];\nUIViewController *firstNavigationController = [[UINavigationController alloc]\n                                               initWithRootViewController:firstViewController];\n\nUIViewController *secondViewController = [[RDVSecondViewController alloc] init];\nUIViewController *secondNavigationController = [[UINavigationController alloc]\n                                                initWithRootViewController:secondViewController];\n\nUIViewController *thirdViewController = [[RDVThirdViewController alloc] init];\nUIViewController *thirdNavigationController = [[UINavigationController alloc]\n                                               initWithRootViewController:thirdViewController];\n\nRDVTabBarController *tabBarController = [[RDVTabBarController alloc] init];\n[tabBarController setViewControllers:@[firstNavigationController, secondNavigationController,\n                                       thirdNavigationController]];\nself.viewController = tabBarController;\n```\n\n#### Customize RDVTabBarController\nEach `RDVTabBarItem` has `selectedBackground`, `unselectedBackground` and corresponding properties for the icons: `selectedImage` and `unselectedImage`.\n\n```objective-c\nUIImage *finishedImage = [UIImage imageNamed:@\"tabbar_selected_background\"];\nUIImage *unfinishedImage = [UIImage imageNamed:@\"tabbar_normal_background\"];\nNSArray *tabBarItemImages = @[@\"first\", @\"second\", @\"third\"];\n\nRDVTabBar *tabBar = [tabBarController tabBar];\n\n[tabBar setFrame:CGRectMake(CGRectGetMinX(tabBar.frame), CGRectGetMinY(tabBar.frame), CGRectGetWidth(tabBar.frame), 63)];\n\nNSInteger index = 0;\nfor (RDVTabBarItem *item in [[tabBarController tabBar] items]) {\n    [item setBackgroundSelectedImage:finishedImage withUnselectedImage:unfinishedImage];\n    UIImage *selectedimage = [UIImage imageNamed:[NSString stringWithFormat:@\"%@_selected\",\n                                                  [tabBarItemImages objectAtIndex:index]]];\n    UIImage *unselectedimage = [UIImage imageNamed:[NSString stringWithFormat:@\"%@_normal\",\n                                                    [tabBarItemImages objectAtIndex:index]]];\n    [item setFinishedSelectedImage:selectedimage withFinishedUnselectedImage:unselectedimage];\n\n    index++;\n}\n```\n\n#### Make the tab bar translucent\n\n`RDVTabBar` has `translucent` property which determines how it is going to be handled.\n\n```objective-c\nRDVTabBar *tabBar = tabBarController.tabBar;\n\n// After the tabBarController initialization\ntabBar.translucent = YES;\n\n// Customize the tabBar background\ntabBar.backgroundView.backgroundColor = [UIColor colorWithRed:245/255.0\n                                                        green:245/255.0\n                                                         blue:245/255.0\n                                                        alpha:0.9];\n\n// Inside the tabbed viewControllers\n- (void)viewDidLoad {\n    [super viewDidLoad];\n    \n    ...\n    \n    if (self.rdv_tabBarController.tabBar.translucent) {\n    \tCGFloat tabBarHeight = CGRectGetHeight(self.rdv_tabBarController.tabBar.frame);\n        UIEdgeInsets insets = UIEdgeInsetsMake(0, 0, tabBarHeight, 0);\n        \n        self.tableView.contentInset = insets;\n        self.tableView.scrollIndicatorInsets = insets;\n    }\n}\n\n```\n\n## Requirements\n\n* ARC\n* iOS 8.0 or later\n* Xcode 11\n\n## Contact\n\n[Robert Dimitrov](http://robbdimitrov.com)   \n[@robbdimitrov](https://twitter.com/robbdimitrov)\n\n## License\n\nRDVTabBarController is available under the MIT license. See the LICENSE file for more info.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobbdimitrov%2Frdvtabbarcontroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobbdimitrov%2Frdvtabbarcontroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobbdimitrov%2Frdvtabbarcontroller/lists"}