Comments (3)
四个步骤:
- 拿到
微信
的导航控制器 - 把tab上的selectedViewController设置
微信
导航控制器 - pop掉
通讯录
中的控制器
4.用微信
导航控制器进行push操作
DCURLRouter如果做的话只要暴露个属性设置下currentNavigationViewController为微信
导航控制器,然后就能进行push操作了,但这样做没有必要啊,直接用微信
导航控制器进行push操作就可以了呀!这也不太符合DCURLRouter设计的初衷啊,DCURLRouter的设计初衷是为了根据服务器给的自定义URL做跳转的.😂
from dcurlrouter.
DCURLRouter的设计初衷是为了根据服务器给的自定义URL做跳转
正是因为这样的设计初衷,所以才会有上面的问题。 上面的问题抽象一下,就是如何通过 URLRouter 实现从任意界面跳转到任意界面的问题。
用URLRouter来描述上面微信的例子,就是:
先假定 通讯录中某联系人详情界面的 URL 是dariel://contact/userA
聊天界面的 URL 是dariel://chatdetail/userA
假如用户现在处于通讯录某个联系人详情界面,然后切到 Safari,输入 dariel://chatdetail/userA
。
预期结果应该是跳转到应用的该用户聊天界面。
如果按照你说的四个步骤,
- 拿到微信的导航控制器
第一步 URLRouter 就需要持有 TabbarController 实例,这和 URLRouter 的解耦目的有冲突吧?
如何在不持有任何实例的情况下实现这一的跳转?
from dcurlrouter.
这的确是个好想法, DCURLRouter对于任意界面间跳转的逻辑处理,尤其是TabbarController上不同的导航控制器间的跳转的处理的确是有点问题. 但我不是很明白不持有任何实例是什么情况?push操作需要拿到对应的导航控制器,而TabBarController可以通过根控制器拿到.
Safari的跳转得通过OpenURL去实现.
from dcurlrouter.
Related Issues (12)
- 建议 HOT 3
- 获取currentNavigationViewController HOT 1
- URL自动转义导致‘#’被转换 HOT 1
- 单导航控制
- 建议 HOT 4
- 随便说几句关于从哪个 VC push或者 modal 出新的 VC HOT 8
- 有没有考虑支持sb呢? HOT 1
- url传入webview中进行跳转不支持url含有中文和空格 HOT 1
- 自定义请求头 换成别的为什么就不行了 HOT 8
- 怎么回传数据 HOT 2
- 老铁 支持StoryBoard吗? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dcurlrouter.