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

BlogDetailDelegate #4

Open
json988 opened this issue Jan 7, 2016 · 1 comment
Open

BlogDetailDelegate #4

json988 opened this issue Jan 7, 2016 · 1 comment

Comments

@json988
Copy link

json988 commented Jan 7, 2016

里头进行了网络请求 这样还符合当初的设计么? Delegate不是单纯的view使用么

@kymjs
Copy link
Owner

kymjs commented Jan 7, 2016

不要死记着哪层该做什么,而要想为什么。
BlogDetailDelegate 里面的网络请求是为了设置 ActionBar 的图片,这部分依旧是 view 的内容,不涉及应用本身的逻辑处理。
其实正常的写法应该是写成一个方法,然后在 Presenter 里面调用这个方法。但是在这个项目中,显然是没有意义的,因为每个使用BlogDetailDelegate 视图的场景都一定回去初始化这个 ActionBar 网络图片的显示。

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

2 participants