FSVerticalTabBarController
Vertical tab bar controller for iOS mimicking UITabBarController look and behavior
Install / Use
/learn @zendeskarchive/FSVerticalTabBarControllerREADME
Overview
This project aims to replicate UITabBarController functionality and behavior, but with a vertical tab bar.
There's no controller for customizing the tab bar in runtime (aka "More" tab), instead the tab bar can accommodate an "infinite" number of tabs because it's a UITableView under the hood (but the scrolling is automatically turned off if it's not necessary).
While some may find it production ready there's still many things that can be added/improved/(fixed), thus all contributions are welcomed. Here's a sneak peek at how it looks like with 120px with tab bar and a textured image as background.
<!-- MacBuildServer Install Button --> <div class="macbuildserver-block"> <a class="macbuildserver-button" href="http://macbuildserver.com/project/github/build/?xcode_project=FSVerticalTabBarExample%2FFSVerticalTabBarExample.xcodeproj&target=FSVerticalTabBarExample&repo_url=git%3A%2F%2Fgithub.com%2Ffuturesimple%2FFSVerticalTabBarController.git&build_conf=Release" target="_blank"><img src="http://com.macbuildserver.github.s3-website-us-east-1.amazonaws.com/button_up.png"/></a><br/><sup><a href="http://macbuildserver.com/github/opensource/" target="_blank">by MacBuildServer</a></sup> </div> <!-- MacBuildServer Install Button -->
Currently includes a sample Universal project that will run on iPad and iPhone. Basic usage is as follows:
FSVerticalTabBarController * tc = [[FSVerticalTabBarController alloc] init];
//Create the first view controller
FSViewController * vc = [[FSViewController alloc] init];
//Create tabItem for the view controller
vc.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"tab 1" image:[UIImage imageNamed:@"magnifying-glass.png"] tag:0];
//create another view controller
FSViewController * vc1 = [[FSViewController alloc] init];
//change background color of second view to differentiate
[vc1.view setBackgroundColor:[UIColor blueColor]];
vc1.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"tab 2" image:[UIImage imageNamed:@"magnifying-glass.png"] tag:1];
//set the view controllers of the the tab bar controller
[tc setViewControllers:[NSArray arrayWithObjects:vc,vc1, nil]];
//set one view controller to be selected
[tc setSelectedViewController:vc];
//set the background color to a texture
[[tc tabBar] setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"ios-linen.png"]]];
//now add the TabBarController to the window as the root controller
[[self window] setRootViewController:tc];
[[self window] makeKeyAndVisible];
Requirements:
- iOS5 or above
- Automatic Reference Counting
TODO:
- add tab bar gradient drawing (currently one can only use images)
- add more delegate methods
- add (better) sample code
- test it with Interface Builder (do we need it? :)
- probably many other
Related Skills
node-connect
350.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
350.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
350.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
