在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:MTransparentNav开源软件地址:https://gitee.com/mengqingzheng/MTransparentNav开源软件介绍:MTransparentNavChange NavigationBar's color and transparency 导航栏滑动渐变 UsageIn the need to change the color of the controller self.navAlpha = 0;self.navTintColor = [UIColor whiteColor];self.navTitleColor = [UIColor whiteColor];self.navBackgroundColor = [UIColor greenColor]; You can change nav tintColor and barTintColor in UIScrollViewDelegate -(void)scrollViewDidScroll:(UIScrollView *)scrollView{ CGFloat y = scrollView.contentOffset.y; self.navAlpha = y / 80; if (y > 80) { self.navTitleColor = self.navTintColor = [UIColor redColor]; } else { self.navTitleColor = y < 0 ? [UIColor clearColor] : [UIColor whiteColor]; self.navTintColor = y < 0 ? [UIColor clearColor] : [UIColor whiteColor]; }} Install
Related articlesAuthorLICENSEMTransparentNav is released under the MIT license. See LICENSE for details. |
请发表评论