Latest 0.0.1
Homepage https://github.com/ONECATYU/WSScrollAnimationTransition
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit, Foundation
Authors

demo运行效果如下:

WSScrollAnimationTransition

使用

使用WSScrollTransitionDelegate类,重写UITabBarController的init和setViewControllers方法,就能实现左右滑动交互转场.

- (instancetype)init
{
    if (self = [super init]) {
        ///初始化方法中构建实例
        _transitionDelegate = [[WSScrollTransitionDelegate alloc]init];
        _transitionDelegate.tabBarController = self;
    }
    return self;
}

- (void)setViewControllers:(NSArray<__kindof UIViewController *> *)viewControllers
{
    [super setViewControllers:viewControllers];
    ///将viewControllers数组传给动画控制器
    ///动画控制需要根据viewControllers中fromVC/toVC的index来确定是向左滑还是向右滑(向下还是向上)
    _transitionDelegate.scrollAnimation.viewCtrollers = viewControllers;
}   

上拉下拉转场时需要注意:
1.先要将动画控制器的scrollDirection设置为WSAnimationScrollDirectionVertical.
2.再设置tabBarController的selectedIndex

Latest podspec

{
    "name": "WSScrollAnimationTransition",
    "version": "0.0.1",
    "summary": "u6c34u5e73/u5de6u53f3u6ed1u52a8u7684u4ea4u4e92u8f6cu573au52a8u753b,u901au8fc7u8be5u8f6cu573au52a8u753bu53efu5c06UITabBarControlleru4f5cu4e3au5bb9u5668,u5b9eu73b0u7c7bu4f3cu5929u732bu5546u54c1u8be6u60c5u9875u7684u6548u679c.",
    "homepage": "https://github.com/ONECATYU/WSScrollAnimationTransition",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "ONECATYU": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/ONECATYU/WSScrollAnimationTransition.git",
        "tag": "0.0.1"
    },
    "source_files": [
        "WSScrollAnimationTransition",
        "WSScrollAnimationTransition/**/*.{h,m}"
    ],
    "frameworks": [
        "UIKit",
        "Foundation"
    ],
    "requires_arc": true
}

Pin It on Pinterest

Share This