Coder Social home page Coder Social logo

vovcmanager's Introduction

VOVCManager(页面管理器)

License Apache  CocoaPods  CocoaPods  Support 

##功能说明

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

##安装

  • cocoapods导入:
pod 'VOVCManager', '~> 2.0.1-beta1'
  • 手动导入: 将VOVCManager文件夹所有源码拽入项目

##更新说明

  • 将[VOVCManager sharedManager]缩减为VVManager类方法,使代码更简单
  • 缩减API,使用VVHop来表示页面跳转的各种参数. VVHop支持链式编程,使代码更容易阅读
  • 修改页面URL的方式,1.0.0版本将不可用.使用VVHop替换之前的VOVCRegistration
  • 原VOVCManager跳转页面的API仍可用,但会有过期警告.

##使用

  • 在需要的文件中导入头文件,通常在pch文件中导入,使用+load的方式初始化单例.
#import "VOVCManager.h"
  • 需要使用URLScheme跳转,请在 (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 运行阶段加入以下代码
    VVHop *hop1 = [VVHop hopWithMethod:VVHop_Pop aStoryboard:@"Main" aController:@"VOFavoriteMainController"];
    [VVManager registerURLPath:@"favorite" forHop:hop1];
  • 使用storyboard,请设置每个ViewController的Storyboard ID和对应的Class名一致.

  • 其他使用请参考注释.

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

    VVHop *hop = [VVHop makeHop:^(VVHop *hop) {
        hop.hop_method(VVHop_Push)
        .hop_aStoryboard(@"Main")
        .hop_aController(@"VORecentsDetailController")
        .hop_parameters(@{@"recentText": @"From VOFavoriteMainController"});
    }];
    [VVManager showPageWithHop:hop];
  • 也可以不使用链式编程
    VVHop *hop = [VVHop hopWithMethod:VVHop_Push aStoryboard:@"Second" aController:@"VOTableViewController"];
    [VVManager showPageWithHop:hop];

vovcmanager's People

Contributors

pozi119 avatar

Watchers

Lucky_lee avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.