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

关于局部刷新问题 #50

Open
Feeeeeerny opened this issue Jan 24, 2018 · 7 comments
Open

关于局部刷新问题 #50

Feeeeeerny opened this issue Jan 24, 2018 · 7 comments
Labels

Comments

@Feeeeeerny
Copy link

你好,在Tangram中,请问类似天猫中分类导航,选择不同分类,需要请求该分类下的商品数据,刷新商品列表,这个是怎么实现的呢?之前问过说你们数据都是后端组装好的,那么类似这种是在前端页面触发点击再更新数据,是怎么做的呢?

@HarrisonXi
Copy link
Contributor

我们配合 Native 代码进行了请求,然后组装了数据,再整体 reload 整张页面。

需要请求的 request 一部分参数是通过 JSON 下发的。

@Feeeeeerny
Copy link
Author

体验上完全看不出reload了整张页面呢哈哈哈,感觉只是reload了该卡片。

@HarrisonXi
Copy link
Contributor

是啊,毕竟上面的内容和 offsetX 其实都没变

@Feeeeeerny
Copy link
Author

另外我看到是有这个方法的 - (void)reloadLayout:(UIView<TangramLayoutProtocol> *)layout 所以是可以局部刷新布局的把?

@HarrisonXi
Copy link
Contributor

那个逻辑现在需要一些额外的保证才能正常用,上次你好似问过

@Feeeeeerny
Copy link
Author

之前说的是不能局部刷新,不过我今天看到这个api,所以问一下。那我再细看下代码。

@yoowei
Copy link

yoowei commented May 3, 2018

您好,- (void)reloadLayout:(UIView *)layout这个需要什么样的额外的保证才能正常使用呢?

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

No branches or pull requests

3 participants