Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何给tabBar设置阴影呢,设置了几次都未成功 #262

Open
sa124a opened this issue Jan 7, 2022 · 1 comment
Open

如何给tabBar设置阴影呢,设置了几次都未成功 #262

sa124a opened this issue Jan 7, 2022 · 1 comment

Comments

@sa124a
Copy link

sa124a commented Jan 7, 2022

网上的方法不适用

//移除顶部线条
self.tabBar.backgroundImage = [UIImage new];
self.tabBar.shadowImage = [UIImage new];

//添加阴影
self.tabBar.layer.shadowColor = [UIColor lightGrayColor].CGColor;
self.tabBar.layer.shadowOffset = CGSizeMake(0, -5);
self.tabBar.layer.shadowOpacity = 0.3;
@maqiqing
Copy link

maqiqing commented Mar 8, 2022

iOS15是用 UITabBarAppearance().shadowImage 吧?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants