lovemo / mvvmframework Goto Github PK
View Code? Open in Web Editor NEW(OC版)总结整理下一个快速开发框架,以更优雅的方式写代码,做一个代码艺术家。分离控制器中的代码,已加入cell自适应高度,自动缓存网络请求代码,降低代码耦合,提高开发效率。
License: MIT License
(OC版)总结整理下一个快速开发框架,以更优雅的方式写代码,做一个代码艺术家。分离控制器中的代码,已加入cell自适应高度,自动缓存网络请求代码,降低代码耦合,提高开发效率。
License: MIT License
问下,如果View里面按钮点击 让 另一个按钮移动,怎么处理呢?因为你的按钮点击事件在ViewManager里面,要想让另一个按钮移动,那么你的ViewManager得持有View里面按钮了。
如果一个页面有多个网络请求, 一个ViewModel怎么区分
[self.viewModel smk_viewModelWithProgress:nil success:^(id responseObject) {
[self.tableViewModel getDataWithModelArray:^NSArray * _Nonnull{
return responseObject;
} completion:^{
[self.tableView reloadData];
}];
} failure:^(NSError *error) {
}];```
希望网络请求缓存机制应该像sdwebimage一样可以设置缓存时间
感觉没写错什么啊
MVC的本质是模型,视图,控制器,其中的模型是指业务模型而不是数据模型。因此MVC本身就能解决现有的各种应用场景。何必要新使用一套MVVM框架,那你置C的地位何在。
请问你写的框架在单个tableview中有多种cell的时候,应该如何写
ThirdVC.m的viewDidLoad方法里:
SMKMediator *mediator = [SMKMediator mediatorWithViewModel:self.viewModel viewManger:self.thirdViewManger];
self.thirdViewManger.smk_mediator = mediator;
self.viewModel.smk_mediator = mediator;
这段会有循环引用问题?
既然MVVM是解耦View和Model之间的关系的,就是独立View和Model ,这样如果要复用这个View的时候就很方便 ,比如我把这个View拖进另外一个工程,就能使用,但是你这个工程并没有独立View和model ,在View里面直接引入Model ,你觉得这个是真正意义上的MVVM?我要复用这个View 我还要有一个一样的Model,这不是耦合吗?
这个页面你缓存行高了么,为何滑动这么卡呢。另外,我貌似看到了forking dog的小狗^-^
大致看了下,让view和model耦合,感觉不好吧,view的复用呢,还有我感觉mvvm中要有双向绑定,不然和mvp有何区别呢
这个SMKAction是你自己封装的 还是 第三方的呢?
[[SMKAction sharedAction] sendRequestBlock:^(NSObject *request) {
// // 方式2
// return [[FirstRequest alloc]init];
// 方式3
//smk_url (如果设置了url,则不需要在设置scheme,host,path 属性)
request.smk_scheme = @"https";
request.smk_host = @"api.douban.com";
request.smk_path = @"/v2/book/search";
request.smk_method = SMKRequestMethodGET; // default
request.smk_params = @{@"q": @"基础"};
return request;
} progress:nil success:^(id responseObject) {
if (responseObject) {
NSArray *modelArray = [FirstModel mj_objectArrayWithKeyValuesArray:responseObject[@"books"]];
success(modelArray);
}
} failure:nil]
首页不一样,点进去看看也不一样?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.