itofu / lctabbarcontroller Goto Github PK
View Code? Open in Web Editor NEWA amazing and highly customized tabBarController! You could almost customize 100% properties with LCTabBarController!
Home Page: https://LeoDev.me
License: MIT License
A amazing and highly customized tabBarController! You could almost customize 100% properties with LCTabBarController!
Home Page: https://LeoDev.me
License: MIT License
如何修改tabbar的高度,我试过在tabbarcontroller直接修改,然后图标那些都全部偏上面去了.
在线等急,谢谢!
Hi,
Thanks for the great project.
What if I don't set the tabbar title, Is there a way to place to image center of the tabbar ?
Thanks ...
After doing some event in Any tab except if i am trying to come First tab , its comintg but the tabbar image is not showing select
如题。
1、在LCTabBarController中,有重载setViewControllers:方法初始化自己的tabbar。然而这样可能是不全面的。UITabBarController添加子VC的调用顺序如下:
setViewControllers:-> setViewControllers: animated: ->addChildViewController:
所以,私以为重载addChildViewController:方法最为合理。
2、为移除系统tabBar的items,有removeOriginControls方法,并公开。
在源码和demo中有两处需调用的场景:tabBarController viewWillApper时、业务层修改barItem属性时手动调用。这用起来就有点不太爽了,特别是第二处。
我的建议,首先没必要在viewWillApper中反复调用,如1,在addChildViewController:时调用一次即可。改变title类似情况,通过KVO可以拿到事件,然后反射到LCTabBar直接调用该方法即可。
In Appdelegate i added 3 class in tab view controller and fourth controller are not added in tab bar. When i push on fourth controller so i see that tab bar not hide on fourth controller. Please reply how to hide tabbar?.
Hello
I want to ask a feature if it is possible .
Well Lets imagine In one tab UINavigationController has more than one UIViewControllers for example;
First you navigate 3rd viewcontroller on same tab
After you change the tab
After again you turn the tab before that you opened 3rd viewcontroller it opens ok.
I want to like this If you click this tab again pop to rootviewcontroller in this navigation.
Is it possible ?
Hello ,
can you help me for disabling the particular tab bar index.?
最近客户端报了几个闪退,找不到原因,检查代码发现这个地方很有嫌疑
(void)removeOriginControls {
[self.tabBar.subviews enumerateObjectsWithOptions:NSEnumerationConcurrent usingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
if ([obj isKindOfClass:[UIControl class]]) {
[obj removeFromSuperview];
}
}];
}
这个方法是不是有问题,removeFromSuperview是view操作应该是在主线程操作的,但是NSEnumerationConcurrent又是并发,不全是在主线程
target 是11.1
在何处初始化:
NSURLSessionDataTask *sessionDataTask = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
//请求完数据后跳转主页
dispatch_async(dispatch_get_main_queue(), ^{
[weakSelf turnToMainViewControllerAnimated];
});
}
MyViewController : UIViewController
初始化代码:
MyViewController *vc4 = [[MyViewController alloc]init];
vc4.view.backgroundColor = [UIColor whiteColor];
vc4.title=@"我的";
vc4.tabBarItem.image = [UIImage imageNamed:@"ic_my.png"];
vc4.tabBarItem.selectedImage = [UIImage imageNamed:@"ic_my_pressed.png"];
LCTabBarController *tabBarC = [[LCTabBarController alloc] init];
tabBarC.itemTitleColor=[XiYeUtilities colorWithHexString:@"#666666"];
tabBarC.selectedItemTitleColor=[XiYeUtilities colorWithHexString:@"#01c0dd"];
tabBarC.viewControllers = @[vc1, vc2, vc3, vc4];
[self.navigationController pushViewController:tabBarC animated:YES];
出现问题:
[self.navigationController pushViewController:tabBarC animated:YES]时会有一瞬间出现下重影,之后消失并能正常使用
[self.navigationController pushViewController:tabBarC animated:NO]时,重影出现后不消失,并且第一个子视图总是处于选中状态,各子视图可以正常点击,就是重影不会消失。
你好!
当调用 popToRootViewControllerAnimated Tabbar出现重新,是应为系统的Item与自定义的Item重叠了
I tried the code however the landscape mode is not working. Am I doing anything wrong?
初始化两个tabbar 放在rootviewcontroller 会有问题?
请问下有解决方法吗?
有时候会出现重影和item 图标和标题从上下布局变成左右布局的问题 。截图传不上来,不知道你们用的时候出现这个问题没?手机从休眠状态到解锁状态容易出现
tabar里面的控制器,popToRootViewControllerAnimated 时候removeOriginControls,会崩溃,求原因,
-[UIViewController removeOriginControls]: unrecognized selector sent to instance 0x1022534e0
如何处理只有icon居中的问题只有其中一个tabBarIem只有icon, icon如何居中?
有点问题想问问:
1、tabBarC.tabBar.backgroundColor = [UIColor yellowColor];好像设置了没有生效;
2、tabBarC.tabBar.selectionIndicatorImage = [UIImage imageNamed:@"tabbaritem_bg"];好像设置了没有生效;
因为有时需求是选中的tabBarItem的背景跟未选中的不一样。有劳了!
我这里是继承LCTabBarController的 代码如下:
self.selectedItemTitleColor = [UIColor colorWithRed:44.0f/255.0f green:110.0f/255.0f blue:203.0f/255.0f alpha:1.0];
self.itemTitleColor = [UIColor colorWithRed:191.0f/255.0f green:191.0f/ 255.0f blue:191.0f/255.0f alpha:1]; 主要是体现在换肤的时候我想改变图标下面字体的颜色 发现无法动态修改
关于旋转 是不是没适配
iOS11那个重影还是存在呢。
cocoapod升级1.3.6后,初始化后默认选中的加入是第0个item,在点击选择其他的item后tabbar会消失
When i tried to check this on iPhone X, it height get automatically bigger.
你好!顺便问下作者,可以开一个QQ群,讨论控件的使用吗?
在NSURLSessionDataTask的 dataTaskWithRequest:request completionHandler:^的方法里,完成数据请求后,跳转会出现2种情况:
1.采用[self.navigationController pushViewController:lcTabBarVC animated:YES];
animated是YES的情况下,重影出现一小会后消失
2.采用[self.navigationController pushViewController:lcTabBarVC animated:NO];
animated是NO的情况下,重影出现不消失并且第一个视图控制器总是保持选中的状态,下面那个bar的最左边那个图案总是选中的状态
[controlle1 viewControllers][1].tabBarItem.badgeValue = @“” 是显示红点么? 如果我不需要红点改怎么设置?
Description:
I had a UITabBarController in my App which I decided to swap for your LCTabBarController. The UITabBarController wasn't being added programmatically, it was added through a Storyboard, so I just changed the Class type in the Storyboard scene.
Expected outcome:
All items are visible like they were when using UITabBarController
Outcome:
Although all items and controllers are present (printing tabBar.items revealed 4 items), none of them is visible nor accessible.
Note:
I find this behaviour pretty weird since in your readme you assure integration should be simply swapping classes...
Hello,
Tab bar badge is not visible into the app,Please have a look .
Thanks,
中间某个按钮特别大,现阶段是不是暂不支持。
Can I push viewcontroller with navigation from my AppDelegate.m?
Like this: [navigationController pushViewController:v2 animated:YES];
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.