Coder Social home page Coder Social logo

itofu / lctabbarcontroller Goto Github PK

View Code? Open in Web Editor NEW
384.0 13.0 81.0 2.49 MB

A amazing and highly customized tabBarController! You could almost customize 100% properties with LCTabBarController!

Home Page: https://LeoDev.me

License: MIT License

Objective-C 97.96% Ruby 2.04%
tabbar cocoapods tabbarcontroller

lctabbarcontroller's Issues

no tabbar title

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 ...

TabBarImage Not changing

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直接调用该方法即可。

Second Clicking on same 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 ?

内存问题

最近客户端报了几个闪退,找不到原因,检查代码发现这个地方很有嫌疑

  • (void)removeOriginControls {

    [self.tabBar.subviews enumerateObjectsWithOptions:NSEnumerationConcurrent usingBlock:^(id obj, NSUInteger idx, BOOL *stop) {

    if ([obj isKindOfClass:[UIControl class]]) {
    
        [obj removeFromSuperview];
    }
    

    }];
    }
    这个方法是不是有问题,removeFromSuperview是view操作应该是在主线程操作的,但是NSEnumerationConcurrent又是并发,不全是在主线程

iPhone X模拟器 重影问题还存在

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]时,重影出现后不消失,并且第一个子视图总是处于选中状态,各子视图可以正常点击,就是重影不会消失。

Tabbar 重影

你好!
当调用 popToRootViewControllerAnimated Tabbar出现重新,是应为系统的Item与自定义的Item重叠了

大佬求解

lalpbbcc1sqjt6lnbcrnaza_816_1482 png_620x10000q90g

大佬, 我只有4个控制器, 却出现了五个位置, 第五个点击就是这样.懵B了

rootViewController removeOriginControls 崩溃

tabar里面的控制器,popToRootViewControllerAnimated 时候removeOriginControls,会崩溃,求原因,
-[UIViewController removeOriginControls]: unrecognized selector sent to instance 0x1022534e0

LCTabBarController问题

有点问题想问问:
1、tabBarC.tabBar.backgroundColor = [UIColor yellowColor];好像设置了没有生效;
2、tabBarC.tabBar.selectionIndicatorImage = [UIImage imageNamed:@"tabbaritem_bg"];好像设置了没有生效;
因为有时需求是选中的tabBarItem的背景跟未选中的不一样。有劳了!

itemTitleColor和SelectTitleColor 无法动态修改吗?

我这里是继承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]; 主要是体现在换肤的时候我想改变图标下面字体的颜色 发现无法动态修改

iPhone X Issues

When i tried to check this on iPhone X, it height get automatically bigger.

Xcode 9.1 iPhone 8 Plus 底部的bar出现重影

在NSURLSessionDataTask的 dataTaskWithRequest:request completionHandler:^的方法里,完成数据请求后,跳转会出现2种情况:
1.采用[self.navigationController pushViewController:lcTabBarVC animated:YES];
animated是YES的情况下,重影出现一小会后消失
2.采用[self.navigationController pushViewController:lcTabBarVC animated:NO];
animated是NO的情况下,重影出现不消失并且第一个视图控制器总是保持选中的状态,下面那个bar的最左边那个图案总是选中的状态
2017-11-08 8 28 35

Items are not visible

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...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.