Comments (6)
你的意思是同一个cell的数据,需要多个model组合起来吗
from formview.
你的意思是同一个cell的数据,需要多个model组合起来吗
不不 比如有个ButtonCell 在A页面 有个A类型的model ButtonCell 需要通过A model 来设置UI
在B页面也用到了ButtonCell 但是此时Model为B 此时需要通过B model来设置UI 这样的Case怎么处理
from formview.
哦哦,懂你的意思你,想想为什么我在cell与model之间抽象了一层cellModel,其实你是不是可以抽象一个协议,buttonCell依赖你的协议,然后cellModel去遵循抽象的协议,这样应该就可以解决了吧
from formview.
哦哦,懂你的意思你,想想为什么我在cell与model之间抽象了一层cellModel,其实你是不是可以抽象一个协议,buttonCell依赖你的协议,然后cellModel去遵循抽象的协议,这样应该就可以解决了吧
明白 我尝试一下 谢谢大佬
from formview.
哦哦,懂你的意思你,想想为什么我在cell与model之间抽象了一层cellModel,其实你是不是可以抽象一个协议,buttonCell依赖你的协议,然后cellModel去遵循抽象的协议,这样应该就可以解决了吧
明白 我尝试一下 谢谢大佬
不客气,其实你再抽象个协议,你的didselect处理,也能放到cellmodel了,这样就形成了一条链路,UI的数据,事件处理,都再cellModel里面了,VC就起到一个协调作用,VC的代码就会非常干净,整个架构扩展性也会很强
from formview.
哦哦,懂你的意思你,想想为什么我在cell与model之间抽象了一层cellModel,其实你是不是可以抽象一个协议,buttonCell依赖你的协议,然后cellModel去遵循抽象的协议,这样应该就可以解决了吧
明白 我尝试一下 谢谢大佬
你是实现了吗,老哥,能借鉴下吗,
from formview.
Related Issues (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 formview.