{"id":21846711,"url":"https://github.com/iosdec/sbtabbarcontroller","last_synced_at":"2026-05-16T12:33:09.833Z","repository":{"id":143618481,"uuid":"149759112","full_name":"iosdec/SBTabbarController","owner":"iosdec","description":"Custom Storyboard UITabbarController / UINavigationController","archived":false,"fork":false,"pushed_at":"2018-09-26T07:52:58.000Z","size":81,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T05:37:47.603Z","etag":null,"topics":["custom","objective-c","storyboard","uinavigationcontroller","uitabbarcontroller"],"latest_commit_sha":null,"homepage":null,"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/iosdec.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}},"created_at":"2018-09-21T12:17:46.000Z","updated_at":"2018-09-26T07:51:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"5d82bc46-a82e-4166-becc-a68686838e18","html_url":"https://github.com/iosdec/SBTabbarController","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iosdec/SBTabbarController","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iosdec%2FSBTabbarController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iosdec%2FSBTabbarController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iosdec%2FSBTabbarController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iosdec%2FSBTabbarController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iosdec","download_url":"https://codeload.github.com/iosdec/SBTabbarController/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iosdec%2FSBTabbarController/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33102834,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","objective-c","storyboard","uinavigationcontroller","uitabbarcontroller"],"created_at":"2024-11-27T23:15:00.588Z","updated_at":"2026-05-16T12:33:09.828Z","avatar_url":"https://github.com/iosdec.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SBTabbarController\n\nStoryboard based UITabBarController.\n\nWant to create a custom UITabBarController from the interface builder? Here is your solution.\n\n## Installation:\n\nDrag these files into your project:\n\n*\"SBTabbarController.m\"*\u003cbr\u003e\n*\"SBTabbarController.h\"*\n\nThen import the header into your project where needed:\n\n```objc\n#import \"SBTabbarController.h\"\n```\n\n## Setup:\n\nFor SBTabbarController to function, create a UIViewController in the interface builder; in this you will create your navigation system (I'm going to use a sidebar as an example):\n\n![Controller Setup](https://github.com/iosdec/SBTabbarController/raw/master/Images/controller_setup.png)\n\n#### \"Active View\"\n\nWe need to create an active view in the controller.. when we change tabs or push controllers onto the stack, this is where they will be displayed - so feel free to customise the frame.\n\nAll we have to do, is set the Restoration ID of this view to \"SBTabbarController\":\n\n![Restoration ID Setup](https://github.com/iosdec/SBTabbarController/raw/master/Images/restoration_id.png)\n\n## Initialise:\n\nNow we have our controller setup, we just need to initialise a SBTabbarController instance and set the controllers.\n\nWe will simply create a UIViewController class for our custom controller:\n\n![Custom Class Setup](https://github.com/iosdec/SBTabbarController/raw/master/Images/custom_class.png)\n\nNow in our custom class.. we can setup our SBTabbarController:\n\n```objc\n- (void)viewDidLoad {\n    [super viewDidLoad];\n    [self setupTabbarController];\n}\n\n#pragma mark\t-\tCustom Tabbar controller setup:\n\n- (void)setupTabbarController {\n\t\n    SBTabbarController *tabBar\t=\t[[SBTabbarController alloc] initWithController:self];\n    \n    UIViewController *first\t\t=\t[UIViewController new];\n    UIViewController *second\t=\t[UIViewController new];\n    UIViewController *third\t\t=\t[UIViewController new];\n    UIViewController *fourth\t=\t[UIViewController new];\n    \n    NSArray *controllers\t\t=\t@[first, second, third, fourth];\n    [tabBar setTabbarControllers:controllers];\n\t\n}\n```\n\n## Usage:\n\nLet's say that we've setup custom actions for our example buttons (tab1, tab2, etc) - when we click these 'tabs', we want to change to a tab in the controllers that we set. Easily done.\n\n```objc\n- (IBAction *)changeToTab1 {\n\t[[SBTabbarController sharedInstance] changeTab:0];\n}\n- (IBAction *)changeToTab2 {\n\t[[SBTabbarController sharedInstance] changeTab:1];\n}\n```\n\n#### Navigation stack:\n\nSBTabbarController also supports a navigation stack - using the same \"active\" view.\u003cbr\u003e\nSimilar methods to UINavigationController have been created:\n\n##### Push\n\n```objc\n- (IBAction *)toToNextScreen {\n    UIViewController *nextController = [UIViewController new];\n    [[SBTabbarController sharedInstance] pushViewController:nextController];\n}\n```\n\n##### Pop\n\n```objc\n- (IBAction *)goBack {\n\t[[SBTabbarController sharedInstance] popViewController];\n}\n```\n\n##### Replace\n\n```objc\n- (IBAction *)replaceScreen {\n\tUIViewController *replacement = [UIViewController new];\n    [[SBTabbarController sharedInstance] replaceViewController:replacement animated:YES];\n}\n```\n\n##### Unwind\n\n```objc\n- (IBAction *)unwindNavigationStack {\n\t[[SBTabbarController sharedInstance] 0];\n}\n```\n\n## Credits:\n\niOSDec\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiosdec%2Fsbtabbarcontroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiosdec%2Fsbtabbarcontroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiosdec%2Fsbtabbarcontroller/lists"}