Skip to content
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

看了这个SwiftMediator是不是不能传递一个对象参数 #1

Open
cczufish opened this issue May 7, 2020 · 7 comments
Open

Comments

@cczufish
Copy link

cczufish commented May 7, 2020

看了这个SwiftMediator是不是不能传递一个对象参数

@zjinhu
Copy link
Owner

zjinhu commented Jul 13, 2020

不能保证跨module这个对象的类存在的情况下不能传,所以考虑到解耦,还是传递基础参数了

@zhangjianjun056
Copy link

参数可以传闭包吗,如何传一个闭包?

@Will-ZJ
Copy link

Will-ZJ commented Nov 13, 2020

@zhangjianjun056 我怀疑你没看楼主的demo

@Will-ZJ
Copy link

Will-ZJ commented Nov 13, 2020

@cczufish 参数模型化,那不是增加了复杂度和耦合度,组件化那不是成了负优化

@zjinhu
Copy link
Owner

zjinhu commented Nov 16, 2020

参数可以传闭包吗,如何传一个闭包?

oc写的那个中间件可以传递block https://github.com/jackiehu/JHMediator

@ywxkdz
Copy link

ywxkdz commented Feb 18, 2021

对象参数不利于扩展, 对象属性A可能在A模块需要 B模块不需要 到C模块可能又需要C属性 还是传字典简单 模块内自己解析

@beforeold
Copy link

如果这个对象会引入依赖,那么不应该传

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants