robbdimitrov / rdvtabbarcontroller Goto Github PK
View Code? Open in Web Editor NEWHighly customizable tabBar and tabBarController for iOS
License: MIT License
Highly customizable tabBar and tabBarController for iOS
License: MIT License
RDVTabBarItem currently does not support badges. Are there plans for that?
wish to support UIViewController hidesBottomBarWhenPushed just like the animation of UITabBarController
Is it possible to use this with Storyboard's ? If not, this is a feature request :-)
How to hide tab bar on specific view controller?
I try to use viewController.hidesBottomBarWhenPushed = YES
,but didn't work.
hellow how i can round the middle tab
like this
https://idevrecipes.files.wordpress.com/2010/12/instagram.png
i want to get the display height (self.view.bounds.size.height) of current viewController's view but the value is not correct, the value is always more than correct value.(RDVTabBar 's height value), i want a value
except the UINavigationBar's height and RDVTabBar 's height just a display height, how to get it Thanks~
How can be the standard translucency effect achieved with RDVTabBarController?
Could you please update podspec in CocoaPods Specs repo?
Spent recently 3 hours to find bug with strong delegate in RDVTabBar :)
Is it possible to override RDVTabBarDelegate methods and put it into APPDelegate using protocols?
- (void)tabBar:(RDVTabBar *)tabBar didSelectItemAtIndex:(NSInteger)index ;
- (BOOL)tabBar:(RDVTabBar *)tabBar shouldSelectItemAtIndex:(NSInteger)index;
i want to decide what to do when the user touch the second time at the same item, eg: if the user touches once, it will open the viewController2, and if he touches again, it will close the viewController2, and showviewController1
something like:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
_timelineVC = [Timeline_ViewController new];
_notificationsVC = [Notifications_ViewController new];
_createPostVC = [CreatePost_ViewController new];
_promotionVC = [Promotion_ViewController new];
_perfilVC = [UserPerfil_ViewController new];
rdv_tabBarController = [[RDVTabBarController alloc]init];
rdv_tabBarController.delegate = self;
[rdv_tabBarController setViewControllers:@[_timelineVC, _notificationsVC, _createPostVC, _promotionVC, _perfilVC ]];
self.viewController = rdv_tabBarController;
[self customizeTabBarForController:rdv_tabBarController];
[self.window setRootViewController:self.viewController];
[self.window makeKeyAndVisible];
}
//***********************************************************************************
- (void)tabBar:(RDVTabBar *)tabBar didSelectItemAtIndex:(NSInteger)index {
if (index < 0 || index >= [[rdv_tabBarController viewControllers] count]) {
return;
}
if ([rdv_tabBarController selectedViewController] == [rdv_tabBarController viewControllers][index]) {
if (index == 2) index = 0;
}
[rdv_tabBarController setSelectedIndex:index];
if ([[rdv_tabBarController delegate] respondsToSelector:@selector(tabBarController:didSelectViewController:)]) {
[[rdv_tabBarController delegate] tabBarController:rdv_tabBarController didSelectViewController:[rdv_tabBarController viewControllers][index]];
}
}
//***********************************************************************************
- (BOOL)tabBar:(RDVTabBar *)tabBar shouldSelectItemAtIndex:(NSInteger)index {
if ([[rdv_tabBarController delegate] respondsToSelector:@selector(tabBarController:shouldSelectViewController:)]) {
if (![[rdv_tabBarController delegate] tabBarController:rdv_tabBarController shouldSelectViewController:[rdv_tabBarController viewControllers][index]]) {
return NO;
}
}
if ([rdv_tabBarController selectedViewController] == [rdv_tabBarController viewControllers][index]) {
if (index != 2) {
return NO;
}
}
return YES;
}
the code:
[_contentView setBackgroundColor:[UIColor whiteColor]]; i want to change it to black
and the contentView is Private, how can i modify.
-(void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
i show ToolBar setting(hideToolBar:NO);
And i repeatedly slide up and down , sometime ToolBar show white color, so i have to [hideToolBar:Yes]
it's better to add hide/show tabbar implementation :)
if has animation, perfect!
How can I programmatically select a tab? Thank you.
hi,RDVTabBarController can set setHidesBottomBarWhenPushed?
If I changed a few methods RDVSecondViewController
You will find below a white view when you second time press,
How to solve?
(void)setItems:(NSArray *)items {
for (RDVTabBarItem *item in items) {
[item removeFromSuperview];
}
_items = [items copy];
for (RDVTabBarItem *item in items) {
[item addTarget:self action:@selector(tabBarItemWasSelected:) forControlEvents:UIControlEventTouchDown];
[self addSubview:item];
}
}
Maybe remove old items
ARC Semantic issue
1.No visible @interface for NSString declare the selector boundingRectWithSize....,
2.No visible @interface for NSString declare the selector drawInRect....,
In landscape mode its not working correctly.
Tableview goes 13px under in tabbar, please help me if any one has solved this issue.
I need set [[self rdv_tabBarController] setTabBarHidden:YES animated:YES];
in viewWillDisappear
and set [[self rdv_tabBarController] setTabBarHidden:NO animated:YES];
in viewWillAppear
.
Copy and paste the code above into RDVTabBarController's demo (RDVFirstViewController.m and RDVSecondViewController.m), I found when I press Second
button, the tabBar will disappear and never appear.
如果我想统一写一个隐藏tabbar 的方法,不知道行不,你的那个方法要每个VC 都要写,有点麻烦
Hi
Thanks for the great project. In which method inside can I start and stop indicator? I need to show indicator until another tab open.
How can I switch the item on the item not only on the icon but more area?
if (![self isTabBarHidden]) {
tabBarStartingY = viewSize.height - tabBarHeight;
contentViewHeight = viewSize.height - [[self tabBar] minimumContentHeight];
}
[[self tabBar] setFrame:CGRectMake(0, tabBarStartingY, viewSize.width, tabBarHeight)]; // 这里的setFrame应该写在if判断里, 否则会导致[[self tabBar] minimumContentHeight] 返回0, 然后contentViewHeight 计算不正确
I am presenting a modal view over the tab bar controller. Then changing the orientation to landscape, once I dismiss the view the tab bar controller looks like this....
This seems to be in both iOS 7 & 8. Oddly I wasn't able to replicate it in the example app, wonder if you had any idea what might cause this odd behaviour? It seems the navigation controller for the tab has the wrong frame and the tab bar itself is missing offscreen.
The latest version crashes when ran on iOS 6. The reason is because of line 122 in RDVTabBarController.m.
[self setNeedsStatusBarAppearanceUpdate];
Needs changed to:
if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)])
{
[self setNeedsStatusBarAppearanceUpdate];
}
When present a view ,the tabbar is always behind the presentedView. No matter is [self presentViewController.....] or [self.rdv_tabBarController presentViewController.....]. How to solve the problem?
I want to apply State Preservation and Restoration in my app but this didn't work. I have checked your code and saw that this feature didn't support for this version. Can you support this feature for library? If you have any suggestion please let me know, I will try to implement it myself.
Is it possible to put title in line break like in 3 lines. and i can put NSAttributed String like the top one is bold and middle and bottom line have different font size.
hi,
imagine now i was in ViewController A(tab was show), and then i push a ViewController B(i have made the tab hide). now it was working fine.then i present a new ViewController C above B,and when the C dismissed,the tab bar show again.
it was unexpectly.
i check the code,and find that in RDVTabBarController.m
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
CGSize viewSize = self.view.frame.size;
CGFloat tabBarHeight = CGRectGetHeight([[self tabBar] frame]);
if (!tabBarHeight) {
tabBarHeight = 49;
}
[[self tabBar] setFrame:CGRectMake(0, viewSize.height - tabBarHeight, viewSize.width, tabBarHeight)];
[[self contentView] setFrame:CGRectMake(0, 0, viewSize.width, viewSize.height -
[[self tabBar] minimumContentHeight])];
[self setSelectedIndex:[self selectedIndex]];
}
and it's not check the tab bar status,and make it always show.
how i can limit the viewed tab only to 5 tab, because i want to insert 7 tab
so later i can change them by changing the index ?
I add a notification like this, - (void)refreshNum:(NSNotification *)notification,this method works , but the badge does't change;
hidesBottomBarWhenPushed is invalid after use RDVTabBarController
How can i create a seprator line between tabs? Please let me know if nay anyone know.
Thanks
@robbdimitrov RDVTabBarController demo project Based on the code. If the project using a storyboard, how to use RDVTabBarController, Can you provide a simple project based on storyboard?
thanks
CocoaPods 0.28.0 is available.
[!] Unable to find a specification for RDVTabBarController
.
iOS 8 is not work, have a white UITransitionView
i have a view controller in tabbar 1 with tabbar hidden, and i [self.rdv_tabBarController setSelectedIndex:3]; when i back to tabar 1 ,there will display a white view with tabbarheight at bottom
when the ios sdk is 7.0, it has a bug when pop the viewcontroller,hope you fix it,I can’t find the reasen.
in RDVTabBarItem.m
- (id)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
// Setup defaults
_title = @"";
_titlePositionAdjustment = UIOffsetZero;
_selectedTitleAttributes = ??
that cause sometimes the title label not draw properly.
Currently i am facing issue w.r.t changing color of the tab bar title.
I want when tab bar is selected it should displayed different title color and when it is unselected it should displayed different title color.
How to achieve this?
when push a new viewcontroller,set the tabbar hide, then in the new viewcontroller, present a new viewcontroller, the tabbar got show.
expected result: the tabbar still hide
Demo project can be download here: https://www.dropbox.com/s/yut6tc3awixsqig/RDVTabBarController-bug.zip
How can I shift badge icon on 4 tab item
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.