Skip to content

Latest commit

 

History

History
45 lines (26 loc) · 653 Bytes

iOS11_TabBar.md

File metadata and controls

45 lines (26 loc) · 653 Bytes

iOS 11 适配 tabbar 跳转界面

  • 跳转界面, tabbar 会跳跃
  • 可以自定义tabbar解决
#import <UIKit/UIKit.h>

@interface XTUITabBar : UITabBar

@end



#import "XTUITabBar.h"

@implementation XTUITabBar


- (void)setFrame:(CGRect)frame
{
    if (self.superview &&CGRectGetMaxY(self.superview.bounds) !=CGRectGetMaxY(frame)) {
        frame.origin.y =CGRectGetHeight(self.superview.bounds) -CGRectGetHeight(frame);
    }
    [super setFrame:frame];
}


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.translucent =false;
    }
    return self;
}

@end