{"id":18270555,"url":"https://github.com/jaykz52/CKSideBarController","last_synced_at":"2025-04-05T01:30:41.468Z","repository":{"id":5638737,"uuid":"6847112","full_name":"jaykz52/CKSideBarController","owner":"jaykz52","description":"CKSideBarController is a UITabBarController-like UIViewController for iPad. Inspired by Twitter for iPad, as well as my own work.","archived":false,"fork":false,"pushed_at":"2013-04-27T23:16:16.000Z","size":658,"stargazers_count":245,"open_issues_count":1,"forks_count":33,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-11-05T11:52:55.547Z","etag":null,"topics":[],"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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaykz52.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-11-25T03:17:08.000Z","updated_at":"2023-06-13T00:34:38.000Z","dependencies_parsed_at":"2022-08-24T20:51:38.345Z","dependency_job_id":null,"html_url":"https://github.com/jaykz52/CKSideBarController","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/jaykz52%2FCKSideBarController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaykz52%2FCKSideBarController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaykz52%2FCKSideBarController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaykz52%2FCKSideBarController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaykz52","download_url":"https://codeload.github.com/jaykz52/CKSideBarController/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276022,"owners_count":20912285,"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":[],"created_at":"2024-11-05T11:38:43.265Z","updated_at":"2025-04-05T01:30:40.949Z","avatar_url":"https://github.com/jaykz52.png","language":"Objective-C","readme":"# CKSideBarController\nCKSideBarController is a UITabBarController-like UIViewController for iPad. It's inspired by Twitter for iPad, as well as my own work. Take a look at the example app included in the source code to see what you can do with CKSideBarController, see the below walkthrough, or dig into the source code!\n\n![Screenshot](http://cloud.github.com/downloads/jaykz52/CKSideBarController/screenshot1.png)\n\n## Dependencies\nTo use CKSideBarViewController in your project, in addition to `UIKit.framework` and `Foundation.framework` you'll need to link against the following frameworks:\n* CoreGraphics.framework\n* QuartzCore.framework\n\n## Adding CKSideBarController to your XCode project\nCocoaPods outstanding, the easiest way to integrate CKSideBarController into your project is to clone the repo and add all of the items under the `Source` directory. This includes a few image resources used by CKSideBarController.\n\nCKSideBarController uses ARC, so for non-ARC projects, you'll want to add the `f-objc-arc` linker flag for  `CKSideBarController.m` and `CKSideBarItem.m`.\n\n## Using CKSideBarController\nCKSideBarController, like UITabBarController and UISplitViewController, works best as the rootViewController of your application:\n\n```objective-c\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions\n{\n    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];\n    // Override point for customization after application launch.\n\n    self.barController = [[CKSideBarController alloc] init];\n    self.window.rootViewController = self.barController;\n\n    [self.window makeKeyAndVisible];\n\n    return YES;\n}\n```\n\nIn order to provide content for the CKSideBarController, you assign an array of UIViewControllers to the `viewControllers` property of your CKSideBarController instance:\n\n```objective-c\n- (void)someMethod {\n    self.barController.viewControllers = @[\n      [[FirstViewController alloc] init],\n      [[SecondViewController alloc] init],\n      [[ThirdViewController alloc] init]\n    ];\n}\n```\n\nWe can configure how each UIViewController managed by the bar controller is displayed by setting by manipulating each's `sideBarItem`. You'll need to import the `CKSideBarController.h` file in order to see the `sideBarItem` property.\n\n```objective-c\n#import \"CKSideBarController.m\"\n\n// ...\n\n@implementation FirstViewController\n\n- (id)init {\n    self = [super init];\n    if (self) {\n        self.sideBarItem.title = @\"First\";\n        self.sideBarItem.image = [UIImage imageNamed:@\"first.png\"];\n        self.sideBarItem.isGlowing = YES;\n\n        // do something awesome...\n    }\n    return self;\n}\n\n// ...\n\n@end\n```\n\nFor more fine-grained control over the CKSideBarController's behavior is via the CKSideBarController's delegate. All methods in the `CKSideBarControllerDelegate` are optional, so implement the ones important to you. Be sure to set the `delegate` property of your CKSideBarController to the appropriate object.\n\n```objective-c\n#pragma mark - CKSideBarControllerDelegate\n\n// Remember sideBarController.delegate = self !!!\n\n- (BOOL)sideBarController:(CKSideBarController *)sideBarController shouldSelectViewController:(UIViewController *)viewController {\n    return NO;  // can't touch this\n}\n\n- (void)sideBarController:(CKSideBarController *)sideBarController didSelectViewController:(UIViewController *)viewController {\n    NSLog(@\"viewController %@ selected!\", viewController);\n}\n```\n\nLastly, if you import the `CKSideBarController.h`, you can access the CKSideBarController ancestor of any UIViewController (if one exists) via the `sideBarController property` mixed into the UIViewCOntroller class. This is much like UINavigationController and UITabBarController. If there is no CKSideBarController ancestor, the property will simply be nil.\n\n## Customizing\nCurrently, the only way to customize the look and feel of CKSideBarController is to alter the source files. The view code is fairly readable, searching on `UIFont`, `UIColor`, and `UIImage` should give you a good starting point.\n\nCurrently, Updating a UIViewController's `sideBarItem` does not trigger a UI refresh. As a stop-gap, you can call the `refresh` method on the CKSideBarController to manually trigger a UI refresh.\n\n## Contributing\nAutomatic UI Refreshing on `sideBarItem` updates does not currently happen. Additionally, it would be nice to provide UI customization points to help match the look-and-feel of the app integrating the controller.\n\n## License (MIT)\nCopyright (c) 2012 Jason Kozemczak\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","funding_links":[],"categories":["etc"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaykz52%2FCKSideBarController","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaykz52%2FCKSideBarController","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaykz52%2FCKSideBarController/lists"}