Who said mobile navigation should be boring? Let’s explore interesting animations inside the tab bars
seen from United States

seen from Türkiye
seen from Germany

seen from United States
seen from Russia

seen from Oman
seen from Yemen

seen from United States

seen from Australia

seen from United States
seen from China
seen from United States
seen from Türkiye
seen from T1
seen from United States
seen from India
seen from United Kingdom
seen from United States

seen from Bangladesh

seen from Ukraine
Who said mobile navigation should be boring? Let’s explore interesting animations inside the tab bars

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Very useful when you're working on a view controller who extends behind toolbars or tab bars
Rubymotionでタブで切り替え出来るUIScrollViewの実装
UIScroolViewとUITabBarが組み合わせられたらなぁ。そしてそれをRoot以外でやりたいなぁ。
ってことで実装しました。UITabScrollView
使い方
class AppDelegate def application(application, didFinishLaunchingWithOptions:launchOptions) @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds) @window.makeKeyAndVisible main = UITabScrollView.alloc.initWithFrame([[0,0],[@window.size.width,@window.size.height]]) sub = UITabScrollViewItem.alloc.initWithFrame([[0,0],[600,@window.size.height-44]]) sub2 = UITabScrollViewItem.alloc.initWithFrame([[0,0],[600,@window.size.height-44]]) sub2.backgroundColor = UIColor.cyanColor sub.title = "fuga" sub2.title = "hoge" main.views([sub,sub2]) @window.addSubview(main) true end end
こんな感じ
UITabScrollViewItemをinitして配列でUITabScrollViewに渡してやればボタンを自動生成してくれる。
ボタンをオリジナルにしたいときは、UITabScrollViewItem.tab_buttonにUITabScrollButtonItemをぶち込んでやればいい。
それぞれUIViewとUIButtonを継承しているので色々いじれる…はず。
ソースはここ https://github.com/grazios/Rubymotion/tree/master/TabScrollView
BOOL hiddenTabBar; UITabBarController *tabBarController; - (void) hideTabBar { [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.4]; for(UIView *view in tabBarController.view.subviews) { CGRect _rect = view.frame; if([view isKindOfClass:[UITabBar class]]) { if (hiddenTabBar) { _rect.origin.y = 431; [view setFrame:_rect]; } else { _rect.origin.y = 480; [view setFrame:_rect]; } } else { if (hiddenTabBar) { _rect.size.height = 431; [view setFrame:_rect]; } else { _rect.size.height = 480; [view setFrame:_rect]; } } } [UIView commitAnimations]; hiddenTabBar = !hiddenTabBar; }
Hide UITabBarController/UITabBar with animation. - Notes of a Developer http://www.developers-life.com/hide-uitabbarcontrolleruitabbar-with-animation.html やや無理矢理ですな
http://stackoverflow.com/questions/1355480/preventing-a-uitabbar-from-applying-a-gradient-to-its-icon-images
Apple added tab bar customization in iOS 5, and now this kind of stuff is trivial. Prior to this it was a huge hack, and not recommended.
Here's how to do a completely custom tab bar:
// custom icons UITabBarItem *item = [[UITabBarItem alloc] init]; item.title = @"foo"; // setting custom images prevents the OS from applying a tint color [item setFinishedSelectedImage:[UIImage imageNamed:@"tab1_active.png"] withFinishedUnselectedImage:[UIImage imageNamed:@"tab1_image_deselected.png"]]; tab1ViewController.tabBarItem = item; // tab bar // set background image - will be used instead of glossy black tabBarController.tabBar.backgroundImage = [UIImage imageNamed:@"tab_bar_bg.png"]; // optionally set the tint color - setting this ti nil will result in the standard, blue tint color. tint color is ignored when custom icons are set as above. tabBarController.tabBar.selectedImageTintColor = nil; // remove the highlight around the selected tab - or provide an alternate highlight image. If you don't do this the iOS default is to draw a highlighted box beneath the selected tab icon. tabBarController.tabBar.selectionIndicatorImage = [[UIImage alloc] init];

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
How to Customize UITabBar on iOS 5
Customers love beautiful apps. Their designers make "amazing" mockups. We, developers, make their dreams come true)
I had a task: make custom TabBar in my app. In the first try - I had wrote absolutely custom TabBar with handling all taps, etc. But it was bad idea, as I understood lately.
How I'd do it now.
In iOS 5, we have so simple way to make our custom TabBar.
First of all, You have to setup the background of TabBar.
[self.tabBarController.tabBar setBackgroundImage:[UIImage imageNamed:@"backgroundImgName"]];
Then, You can setup each your TabBar cell.
for(UITabBarItem *item inself.tabBar.items) {
[item setFinishedSelectedImage:[UIImage imageNamed:@"selCell"] withFinishedUnselectedImage:[UIImage imageNamed:@"stdCellImg"]];
[item setTitle: @"someText"];
[item setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor greenColor], UITextAttributeTextColor,
nil] forState:UIControlStateNormal];
}
What does this code do? - It's simple!
1. Setting pics for cells
[item setFinishedSelectedImage:[UIImage imageNamed:@"selCell"] withFinishedUnselectedImage:[UIImage imageNamed:@"stdCellImg"]];
setFinishedSelectedImage: you pass img for displaying selected tab.
withFinishedUnselectedImage: you pass img for normal state of your cell (when cell hasn't chosen).
2. Set text below the image.
[item setTitle: @"someText"];
3. Set some attributes for this text (f.e. color)
[item setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [UIColor greenColor], UITextAttributeTextColor, nil] forState:UIControlStateNormal];
That's all. But, I made one more feature.
For example, in your tabs, color of text (or maybe text) changes when user select/unselect tab. Let's make it.
You have to implement protocol <UITabBarControllerDelegate>. To do it, don't forget to set self.delegate = self;
This protocol has a lot of different methods, but we need
- (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController
This method calls when user taps on the other tab, and you can configure this transition as you want. You can even forbid transitions to some tabs in this method. Just return NO; from this method.
But, what we can do to customize out TabBar?
- (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController {
int indexOfView = [tabBarController.viewControllers indexOfObject:viewController];
UITabBarItem *item = [self.tabBar.items objectAtIndex:indexOfView];
[item setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor redColor], UITextAttributeTextColor,
nil] forState:UIControlStateNormal];
// set prev item gray text
UITabBarItem *prevItem = [self.tabBar.items objectAtIndex:_prevSelectedTabIndex];
[prevItem setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor grayColor], UITextAttributeTextColor,
nil] forState:UIControlStateNormal];
// change prevIndex
_prevSelectedTabIndex = indexOfView;
return YES;
}
We change color of text below the pic to red on the selected tab. And previous cell set back to gray.
That's all.
Big thanks to this article.
have a nice coding ;)
how to set set Background Image for UITabBar
-(void)setbgImage{
UIImage *bgimage =[UIImage imageNamed:@"tab.png"];
if([self respondsToSelector:@selector( setBackgroundImage:)])
[self setBackgroundImage:bgimage];
else{
CGRect frame = CGRectMake(0.0, 0, self.bounds.size.width, 48);
UIImageView *imageView = [[UIImageView alloc]initWithImage:bgimage];
imageView.frame= frame;
[self insertSubview:imageView atIndex:0];
[imageView release];
}
How to Custom UIKit Controls
https://github.com/boctor/idev-recipes
CustomBackButton
CustomSegmentedControls
CustomTabBar
CustomTabBarNotification
RaisedCenterTabBar
SideSwipeTableView
StretchableImages
TabBarAnimation
TransparentUIWebViews
VerticalSwipeArticles
WoodUINavigation
WordPressReimagined