Open xuguoyongmac opened 6 years ago
Cell的高度自适应的时候, 需要给cell一个成员属性model这样的一个key, 换句话说 ,也就是需要在cell里面直接使用到model ,这样 cell和model直接就产生了耦合,如果其他界面需要这样cell的时候 ,就需要一个相同的model或者是一个otherModel这样的属性,然后再重新布局,这样无论是从MVC的角度 或者是MVVM的角度来说 ,都已经是违背本身的原理的 ,而且这样的Cell复用程度并不高,有没有什么方法来处理这样的问题?
Cell的高度自适应的时候, 需要给cell一个成员属性model这样的一个key, 换句话说 ,也就是需要在cell里面直接使用到model ,这样 cell和model直接就产生了耦合,如果其他界面需要这样cell的时候 ,就需要一个相同的model或者是一个otherModel这样的属性,然后再重新布局,这样无论是从MVC的角度 或者是MVVM的角度来说 ,都已经是违背本身的原理的 ,而且这样的Cell复用程度并不高,有没有什么方法来处理这样的问题?