KLScaleNavigationBar
示例
要运行示例项目,请克隆仓库,并首先从 Example 目录运行 pod install
。
/// 使用
1、第一步需要隐藏导航栏
2、初始化
self.dynamicBar = [KLScaleNavigationBar.alloc initWithScrollView:self.collectionView];
self.dynamicBar.backgroundView.image = xxx; // 导航栏背景图
self.dynamicBar.botView.image = xxx; // 导航栏下方长图,与导航栏背景图一致
self.dynamicBar.topView.image = xxx; // 下拉时显示的活动页,大小与屏幕一致
[self.view addSubview:self.dynamicBar];
// 设置代理调用方法
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
// 80为预留导航栏右侧按钮的位置,这里使用的事MJRefresh,self.collectionView.mj_header.mj_h 刷新控件的高度
[self.dynamicBar dynamicWithRightSpace:80 refreshHeight:self.collectionView.mj_header.mj_h];
}
要求
安装
KLScaleNavigationBar 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中
pod 'KLScaleNavigationBar'
作者
[email protected], [email protected]
许可证
KLScaleNavigationBar遵循MIT许可证。有关更多信息,请参阅LICENSE文件。