Skip to content
页面管理器.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Example
VVManager
.gitignore
.swift-version
.travis.yml
LICENSE
README.md
VVManager.podspec
_Pods.xcodeproj

README.md

VVManager(页面管理器) 2.1.0

CI Status Version License Platform

版本更新

  • 打印调试信息改为[VVManager setVerbose:YES].
  • 链式编程设置属性前缀改为vv_.
  • 添加两个通知:VVManagerViewDidAppearNotification,VVManagerViewDidDisappearNotification

功能说明

  • 跳转指定页面,只需要知道viewController的Class名,如果有storyboard,则需要指定storyboard名.
  • 支持URLScheme跳转指定页面.

安装

  • cocoapods导入:
pod 'VVManager'
  • 手动导入: 将VOVCManager文件夹所有源码拽入项目

使用

  • 在需要的文件中导入头文件,通常在pch文件中导入,使用+load的方式初始化单例.
#import "VVManager.h"
  • 需要使用URLScheme跳转,请在 (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 运行阶段加入以下代码
    // 在Safari mobile或者其他支持URLScheme的浏览器中打开 app://favorite 即可打开该页面
    [VVManager registerURLPath:@"favorite" forHop:[VVHop hopWithMethod:VVHop_Pop aStoryboard:@"Main" aController:@"VVFavoriteMainController"]];
  • 使用storyboard,请设置每个ViewController的Storyboard ID和对应的Class名一致.

  • 其他使用请参考注释.

  • VOVCFavoriteMainController中有使用代码进行跳转的示例.

    [VVManager showPageWithHop:[VVHop makeHop:^(VVHop *hop) {
        hop.vv_method(VVHop_Push)
        .vv_aStoryboard(@"Main")
        .vv_aController(@"VVRecentsDetailController")
        .vv_parameters(@{@"recentText": @"From VVFavoriteMainController"});
    }]];
  • 也可以不使用链式编程
    [VVManager showPageWithHop:[VVHop hopWithMethod:VVHop_Push aStoryboard:@"Second" aController:@"VVTableViewController"]];

Author

pozi119, pozi119@163.com

License

VVManager is available under the MIT license. See the LICENSE file for more info.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.