iOS 自定义tabbar 悬浮 且中间凸起

2024-05-23  本文已影响0人  小黑技术
截屏2024-05-24 14.21.50.png

CGSize viewSize = self.view.bounds.size;
CGFloat tabBarStartingY = viewSize.height;
CGFloat tabBarHeight = 110;

JJTabBar *customTabBar = [[JJTabBar alloc] initWithFrame: CGRectMake(15, tabBarStartingY - tabBarHeight, viewSize.width-30, 80) config:config];
customTabBar.backgroundColor = [UIColor clearColor];
customTabBar.delegate = self;
customTabBar.layer.cornerRadius = 30;
customTabBar.layer.masksToBounds = true;
[self.view addSubview:customTabBar];
self.customTabBar = customTabBar;

好用简单方便,
可以自定义各种样式
demo

上一篇下一篇

猜你喜欢

热点阅读