{"id":20544348,"url":"https://github.com/ratulsharker/rscustomtabbarcontroller","last_synced_at":"2025-10-10T20:36:07.037Z","repository":{"id":75563604,"uuid":"67225095","full_name":"ratulSharker/RSCustomTabbarController","owner":"ratulSharker","description":"This is super flexible Custom tab bar controller implementation. You have the complete opportunity to customise according to your necessity ( ## Also support swift ## )","archived":false,"fork":false,"pushed_at":"2017-02-28T17:10:34.000Z","size":21478,"stargazers_count":38,"open_issues_count":0,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-14T09:58:05.973Z","etag":null,"topics":["custom-tabbar-controller","framework","objective-c","storyboard","swift","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/ratulSharker.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-09-02T13:32:45.000Z","updated_at":"2023-12-18T04:24:28.000Z","dependencies_parsed_at":"2023-06-06T22:15:26.793Z","dependency_job_id":null,"html_url":"https://github.com/ratulSharker/RSCustomTabbarController","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ratulSharker/RSCustomTabbarController","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ratulSharker%2FRSCustomTabbarController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ratulSharker%2FRSCustomTabbarController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ratulSharker%2FRSCustomTabbarController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ratulSharker%2FRSCustomTabbarController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ratulSharker","download_url":"https://codeload.github.com/ratulSharker/RSCustomTabbarController/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ratulSharker%2FRSCustomTabbarController/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005272,"owners_count":26083863,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["custom-tabbar-controller","framework","objective-c","storyboard","swift","tabbarcontroller"],"created_at":"2024-11-16T01:43:59.067Z","updated_at":"2025-10-10T20:36:07.031Z","avatar_url":"https://github.com/ratulSharker.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RSCustomTabbarController\nThis is super flexible Custom tab bar controller implementation. You have the complete opportunity to customise according to your necessity.\n\n## Want to check on your own ?\nExperience a **[live demonstration](https://appetize.io/app/nqd9py0znzmgar66cxtfw7vxzc?device=iphone5s\u0026scale=75\u0026orientation=portrait\u0026osVersion=9.3)**\n\n## Simple Demonstration\nYou can design whatever tabbar controller comes in your mind. Following is some simple demonstration. Many more are yet to come. If you have any unique idea, you would like to implement it for you feel free to contact Sharker.ratul.08@gmail.com\n\n\u003cimg src='https://github.com/ratulSharker/Gif-Demonstration/blob/master/RSCustomTabbarController/RSCustomTabbarController-demo.gif'\u003e\u003c/img\u003e\n\n## Simple tutorial\n\n###Step1: \nCopy the [RSCustomTabbarController](https://github.com/ratulSharker/RSCustomTabbarController/tree/master/RSCustomTabbarController/CustomTabbarConroller) in your project.\n\n###Step2:\nCreate a new class extending from the base class `RSCustomTabbarController`. Let the new class name is `Demo1TabbarController`.\n`Demo1TabbarController.h` looks like following.\n\n```obj-c\n#import \u003cUIKit/UIKit.h\u003e\n#import \"RSCustomTabbarController.h\"\n\n@interface Demo1TabbarController : RSCustomTabbarController \n\n@end\n```\nNow implement the `RSCustomTabbarImplementationDelegate` by adding following properties \u0026 methods in `Demo1TabbarController`\n\n```obj-c\n@property UIView *viewControllerContainer;\n\n@property NSArray\u003cNSLayoutConstraint*\u003e *tabbarContainerHeight;\n@property NSArray\u003cNSLayoutConstraint*\u003e *tabbarWidgetHolderTop;\n\n-(CGFloat)heightForTabbarController:(RSCustomTabbarController*)tabbarController;\n-(void)newSelectedTabbarIndex:(NSUInteger)newSelectedIndex whereOldIndexWas:(NSUInteger)oldSelectedIndex;\n```\n\nBefore getting into nitty gitty details, first grab some key concept about this protocol. This `RSCustomTabbarImplentationDelegate` will\nask for these 3 properties \u0026 2 method. You are about to apply your own graphical design, but how should `RSCustomTabbarController` would \nknow about which is your view controller container and what will act as an tabbar container. Thats why this protocol is designed to communicate between your provided presentation and internal tabbar like maintanance.\n\nnow the `Demo1TabbarController.h` is looks like\n```obj-c\n#import \u003cUIKit/UIKit.h\u003e\n#import \"RSCustomTabbarController.h\"\n\n@interface Demo1TabbarController : RSCustomTabbarController \u003cRSCustomTabbarImplementationDelegate\u003e\n\n#pragma mark implementation properties\n@property IBOutlet UIView *viewControllerContainer;\n@property IBOutletCollection (NSLayoutConstraint) NSArray *tabbarContainerHeight;\n@property IBOutletCollection (NSLayoutConstraint) NSArray *tabbarWidgetHolderTop;\n\n@end\n```\n\nand the `Demo1TabbarController.m` will look like\n```obj-c\n#import \"Demo1TabbarController.h\"\n\n@interface Demo1TabbarController ()\n\n@end\n\n@implementation Demo1TabbarController\n\n#pragma mark life cycle\n-(void)viewDidLoad\n{\n    [super viewDidLoad];\n}\n\n#pragma mark CustomTabbarImplementationDelegate\n-(CGFloat)heightForTabbarController:(RSCustomTabbarController*)tabbarController\n{\n    //todo -- implementation\n}\n-(void)newSelectedTabbarIndex:(NSUInteger)newSelectedIndex whereOldIndexWas:(NSUInteger)oldSelectedIndex\n{\n    //todo -- implementation\n}\n@end\n```\n\nFor now we are done with class. Now we need to add a inteface builder file (storyboard/nib) file for designing the tabbar controller.\nFollowing is the hierarchy we will be following to create the `Demo1TabbarContorller`\n\n```\n      UIVIewController\n      |\n      |--\u003e self.view\n          |\n          |--\u003e viewController container\n          |--\u003e tabbar container\n              |\n              |--\u003e bar button container\n                  |\n                  |--\u003e buttons\n```\n\nStoryboard designing can be done as followos\n\n[![Checkout at youtube](https://img.youtube.com/vi/8Yq26NWsHVo/0.jpg)](https://www.youtube.com/watch?v=8Yq26NWsHVo)\n\nAfter done with your designing, now add some `IBOutlets`, `IBactions` and variables in the `Demo1TabbarController.m`. It should look like following\n\n```obj-c\n#import \"Demo1TabbarController.h\"\n\n@interface Demo1TabbarController ()\n{\n    NSArray\u003cUIButton*\u003e *buttonArr;\n}\n@property (strong, nonatomic) IBOutlet UIButton *mViewBtn0;\n@property (strong, nonatomic) IBOutlet UIButton *mViewBtn1;\n@property (strong, nonatomic) IBOutlet UIButton *mViewBtn2;\n@property (strong, nonatomic) IBOutlet UIButton *mViewBtn3;\n@property (strong, nonatomic) IBOutlet UIButton *mViewBtn4;\n\n@end\n\n@implementation Demo1TabbarController\n\n#pragma mark life cycle\n-(void)viewDidLoad\n{\n    _mViewBtn0.tag = 0;\n    _mViewBtn1.tag = 1;\n    _mViewBtn2.tag = 2;\n    _mViewBtn3.tag = 3;\n    _mViewBtn4.tag = 4;\n    \n    \n    buttonArr = @[_mViewBtn0, _mViewBtn1, _mViewBtn2, _mViewBtn3, _mViewBtn4];\n    \n    [super viewDidLoad];\n}\n\n\n#pragma mark CustomTabbarImplementationDelegate\n-(CGFloat)heightForTabbarController:(RSCustomTabbarController*)tabbarController\n{\n    return 95;\n}\n-(void)newSelectedTabbarIndex:(NSUInteger)newSelectedIndex whereOldIndexWas:(NSUInteger)oldSelectedIndex\n{\n    buttonArr[oldSelectedIndex].selected = NO;\n    buttonArr[newSelectedIndex].selected = YES;\n}\n\n#pragma mark IBActions\n-(IBAction)tabbarButtonPressed:(UIButton*)sender\n{\n    NSLog(@\"tabbar button pressed\");\n    [super setSelectedViewCotnrollerAtIndex:sender.tag];\n}\n\n@end\n```\n\nNow time to connect the IBAction and IBOutlet of the implementation so that the storyboard widgets can map into it. These are shown in the next video.\n\n[![Checkout at youtube](https://img.youtube.com/vi/kigm5uvIEuo/0.jpg)](https://www.youtube.com/watch?v=kigm5uvIEuo)\n\nOur custom tabbar is ready to rock and roll. Instantiate it from Storyboard and use it just like regular [UITabbarController](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITabBarController_Class/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fratulsharker%2Frscustomtabbarcontroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fratulsharker%2Frscustomtabbarcontroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fratulsharker%2Frscustomtabbarcontroller/lists"}