Coder Social home page Coder Social logo

Comments (7)

code1303009 avatar code1303009 commented on May 30, 2024

I had fix it by writing follow in your method - (void)setTabBarHidden:(BOOL)hidden animated:(BOOL)animated {
_tabBarHidden = hidden;
__weak DMTabBarController *weakSelf = self;

void (^block)() = ^{
    CGSize viewSize = weakSelf.view.bounds.size;
    CGFloat tabBarStartingY = viewSize.height;
    CGFloat contentViewHeight = viewSize.height;
    CGFloat tabBarHeight = CGRectGetHeight([[weakSelf tabBar] frame]);

    if (!tabBarHeight) {
        tabBarHeight = 49;
    }

    if (!hidden) {
        tabBarStartingY = viewSize.height - tabBarHeight;
        if (![[weakSelf tabBar] isTranslucent]) {
            contentViewHeight -= ([[weakSelf tabBar] minimumContentHeight] ?: tabBarHeight);
        }
        [[weakSelf tabBar] setHidden:NO];
    }

    [[weakSelf tabBar] setFrame:CGRectMake(0, tabBarStartingY, viewSize.width, tabBarHeight)];
    if ([[UIDevice currentDevice] systemVersion].floatValue >= 7.0 && [[UIDevice currentDevice] systemVersion].floatValue < 8.0) {
        [[weakSelf contentView] setFrame:[UIScreen mainScreen].bounds];
    }else{
        [[weakSelf contentView] setFrame:CGRectMake(0, 0, viewSize.width, contentViewHeight)];
    }
};

void (^completion)(BOOL) = ^(BOOL finished){
    if (hidden) {
        [[weakSelf tabBar] setHidden:YES];
    }
};

if (animated) {
    [UIView animateWithDuration:0.24 animations:block completion:completion];
} else {
    block();
    completion(YES);
}

}

from rdvtabbarcontroller.

wy19901227 avatar wy19901227 commented on May 30, 2024

you have fix this bug ,but the other bug come appear . The fram is not correct .

from rdvtabbarcontroller.

code1303009 avatar code1303009 commented on May 30, 2024

would you have better ideas?

from rdvtabbarcontroller.

wy19901227 avatar wy19901227 commented on May 30, 2024

这个bug,ios8已经完美解决了这个bug。但是毕竟不开源,我似乎找到了原因,问题就出现在pop这个方法里,苹果估计是在ios8修改了这个方法,所以要fix这个bug就要重写这个pop方法,或者你设置隐藏tabbar的时候animation改为NO就没有这个问题了。

from rdvtabbarcontroller.

code1303009 avatar code1303009 commented on May 30, 2024

虽然可能不是我需要的效果 但是还是谢谢你了

from rdvtabbarcontroller.

cugbwxc avatar cugbwxc commented on May 30, 2024

iOS8 侧滑 会crash, POP 也可能crash,这个有解决么?

from rdvtabbarcontroller.

code1303009 avatar code1303009 commented on May 30, 2024

demo么? 我这里没有问题啊

from rdvtabbarcontroller.

Related Issues (20)

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.