-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MVVM模块下,RACObserve(self.dataDriver, expressData)奔溃 #12
Comments
ReactiveCocoa版本是2.5.2吗 |
项目依赖: pod 'ReactiveCocoa', '~> 2.5' 官网好像没有2.5.2版本 刚尝试了: pod 'ReactiveCocoa', :git => 'https://github.com/zhao0/ReactiveCocoa.git', :tag => '2.5.2' 问题还存在。 |
我打开例子工程的 |
对比了差异: #1. 注册
// 配置乐高框架 // 使有默认配置
[[XFLegoConfig defaultConfig]
addComponentHanderPlug:[LEMVVMModuleHandler class]]; // 添加扩展MVVM模块组件处理器
[XFURLRoute initURLGroup:@[
@"rac://Login", // mvvm组件
]];
#2. push
XF_PUSH_Component_Fast(@"rac://Login") 项目 XFAboutViewController *aboutVC = [[XFAboutViewController alloc] init];
// [LEMVVMConnector makeComponentFromUInterface:aboutVC forName:@"about"];
[LEMVVMConnector makeComponentFromUInterface:aboutVC forName:@"about" intentData:@{@"id":@(123)}];
UINavigationController *nav = [[XFNavigationController alloc] initWithRootViewController:aboutVC];
[self.realUInterface presentViewController:nav animated:YES completion:nil]; |
例子中的用法是旧项目里从ViewController --跳转到--> MVVM组件,起到桥接旧项目的目的,你使用URL注册并执行宏push也是可以的,例子改了下,你下下来看看,没有问题的 |
另外,MVVM组件不是必需继承 |
我fork项目,然后使用mvvm模块创建了一个模块:
方便试一下吗?fork |
将所类的前缀 |
在mVVM模块下,bindViewData方法中,仅打开默认的绑定代码块RACObserve:
奔溃位置:
The text was updated successfully, but these errors were encountered: