VCBarHeightAnimator 1.0.1

VCBarHeightAnimator 1.0.1

healmax 维护。



  • 作者
  • Vincent

VCBarHeightAnimator

Platform Language License

VCBarHeightAnimator 是一个简单的组件,用于显示和隐藏 iOS (Obj-C) 应用中的导航栏和标签栏

VCBarHeightAnimator 演示 1


VCBarHeightAnimator 演示 2



使用 CocoaPods 进行安装

CocoaPods 是 Objective-C 的依赖管理器,它自动化并简化了在项目中使用如 VCBarHeightAnimator 等第三方库的过程。

$ gem install cocoapods

Podfile

要使用 CocoaPods 将 VCBarHeightAnimator 集成到您的 Xcode 项目中,请在您的 Podfile 中指定它

platform :ios, '11.0'

target 'TargetName' do
pod 'VCBarHeightAnimator'
end

使用方法

ViewController.m
@interface DemoPresentScrollViewController ()<UICollectionViewDelegateFlowLayout, UICollectionViewDataSource, VCBarHeightAnimating, VCBarHeightAnimatorDelegate>

@property (weak, nonatomic) IBOutlet UICollectionView *collectionView;
@property (nonatomic, strong) VCBarHeightAnimator *barHeightAnimator;

@end
#pragma mark - life cycle

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [self.barHeightAnimator showBarWithAnimated:NO];
}

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    [self.barHeightAnimator showBarWithAnimated:NO];
}
#pragma mark - accessor

- (VCBarHeightAnimator *)barHeightAnimator {
    if (!_barHeightAnimator) {
        _barHeightAnimator = [[VCBarHeightAnimator alloc] initWithBarHeightAnimatingWithViewController:self scrollView:self.collectionView];
    }
    
    return _barHeightAnimator;
}

特性

  • 使用简单,只需传递您的视图控制器和 scrolls
  • 适用于所有大小(iPhone / iPad)
  • 支持设置导航透明

许可

VCBarHeightAnimator 在 MIT 许可下可用。有关更多信息,请参阅 LICENSE 文件。