Code Monkey home page Code Monkey logo

route's Introduction

使用方式

  • 核心文件在Core文件夹中
  • Core/Utils中放置工具类
  • Core/Config中放置配置文件
  • route.plist结构说明如下
     
     	"data": {  
     		"/list": {  
     			"vc": "ListViewController",   
     			"present": NO		
     		},   
     		"/detail": {  
     			"vc": "DetailViewController",  
     			"present": NO  
     		},  
     		"/present": {  
     			"vc": "PresentViewController",  
     			"present": YES  
     		},  
     		"/push": {  
     			"vc": "PushViewController",  
     			"present": NO  
     		}  
     	},  
     	sign:"0"	  
    
    

其中 sign:md5用于校验服务端是否有新的plist文件 vc:url对应的类名 present:页面跳转方式

  • Configuration.h中为scheme及host,这两个不能为空,且每个项目唯一scheme,scheme与info.plist中配置的scheme相同

  • Core/Base放置跟路由相关文件

    • ROURouter:路由
    • ROUEntery:入口文件,处理ROURouter中返回的viewController
  • Core/UI放置跟UI相关文件

    • ROUNavigator:封装了导航相关文件
    • ROUBlankViewController:空页面,url有误时候显示该页面
    • ROUWebViewController:web页面,如果scheme为http、 https、 ftp、 mailto、 file、 data、 irc时显示该页面
  • 页面调转如下所示[ROUEntery openURL:[NSString stringWithFormat:@"%@://%@/present", projectScheme, projectHost], completion:nil];

route's People

Contributors

hanjt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 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.