Home
Sign Up
Sign In
iOS 开发实用技术导航
NSHipster 中文版
›
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
›
http://www.cocos2d-iphone.org/
CocoaPods
›
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
›
http://code.google.com/mobile/analytics/
WWDC
›
https://developer.apple.com/wwdc/
Design Guides and Resources
›
https://developer.apple.com/design/
Transcripts of WWDC sessions
›
http://asciiwwdc.com
Cocoa with Love
›
http://cocoawithlove.com/
Cocoa Dev Central
›
http://cocoadevcentral.com/
NSHipster
›
http://nshipster.com/
Style Guides
›
Google Objective-C Style Guide
›
NYTimes Objective-C Style Guide
Useful Tools and Services
›
Charles Web Debugging Proxy
›
Smore
Advertisement
V2EX
›
iDev
MVVM+RAC 中页面跳转怎么处理比较好?
coa
·
Aug 9, 2016
· 3834 views
This topic created in 3704 days ago, the information mentioned may be changed or developed.
RT ,想把按钮的逻辑都封成 RACCommand 放在 ViewModel ,不过时不时还是会遇到到页面跳转这些不大容易抽取出来的。目前的处理方式是一遇到跳转就调用某个空的方法,然后用的时候在 V 中对该空方法进行 hook ,实现实际的跳转。但总感觉不大完美,有没有其他处理方式?
跳转
rac
mvvm
raccommand
6 replies
•
2016-08-18 17:14:26 +08:00
1
coa
OP
Aug 9, 2016
顶一个~iDev 节点好冷清。。。
2
xiubin
Aug 9, 2016
在 V 中对该空方法进行 hook ?这么 6 ?这个玩意不应该是统一 hook 吗?
如果说传统的是 vc push vc ,现在的就是 vm push vm ?
3
coa
OP
Aug 9, 2016
@
xiubin
主要是原先的不少代码还是基于 MVC ,想要全局 vm push vm 就得大规模重构了。。。
所以跳转果然只能 hook 了么。。
4
xiubin
Aug 9, 2016 via iPhone
@
coa
不错不错,等你啥时候有经验了,也教教我
5
coa
OP
Aug 9, 2016
@
xiubin
囧~ 我们还是一起等其他 v 友的经验好了。。。
6
bloodshed
Aug 18, 2016
可以参照
http://blog.leichunfeng.com/blog/2016/02/27/mvvm-with-reactivecocoa/
的设计
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
4588 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 29ms ·
UTC 08:27
·
PVG 16:27
·
LAX 01:27
·
JFK 04:27
♥ Do have faith in what you're doing.
❯