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

container-banner 没有内置到TangramLayoutTypeMap.plist文件中导致崩溃,indicatorImg1设置问题,aspectRatio设置问题 #51

Closed
xian-zh opened this issue Jan 29, 2018 · 14 comments

Comments

@xian-zh
Copy link

xian-zh commented Jan 29, 2018

最近公司想使用tangram框架,但是苦于没有太多的资料,只好闷头看源码,但是看得懵懵懂懂的,在使用过程中我有几个问题:

container-banner 没有内置到TangramLayoutTypeMap.plist文件中导致崩溃?(在android下有这个但是没有container-scroll)

@xian-zh
Copy link
Author

xian-zh commented Jan 29, 2018

在使用轮播布局type=10 的时候使用indicatorImg1图片时,定时器startTimer调用两次但是重复创建了导致页面异常
pastedgraphic-3

@xian-zh
Copy link
Author

xian-zh commented Jan 30, 2018

在使用indicatorImg1 时calculateLayout调用了buildIndicator方法加载图片出来indicatorHeight如果indicatorHeight高度没设置的话[strongSelf heightChangedWithElement:nil model:nil];后又调用了calculateLayout方法导致布局重复添加了,致使图片自动滚动异常
wx20180130-104108
wx20180130-104310

@xian-zh xian-zh changed the title container-banner 没有内置到TangramLayoutTypeMap.plist文件中导致崩溃 container-banner 没有内置到TangramLayoutTypeMap.plist文件中导致崩溃,indicatorImg1设置问题,aspectRatio设置问题 Jan 30, 2018
@xian-zh
Copy link
Author

xian-zh commented Jan 30, 2018

snip20180130_1
看图求解TangramPageScrollLayout布局 aspectRatio设置逻辑问题

@xian-zh
Copy link
Author

xian-zh commented Jan 30, 2018

在流式布局中 设置aspectRatio表示每行的宽高比
pasted graphic 1
但是在设置
pasted graphic 2
pasted graphic 3

导致aspectRatio设置没有效果呢

@HarrisonXi
Copy link
Contributor

关于 container-banner 这个容器,iOS 版本里的确暂时没有打算在开源版里支持。如果您遇到崩溃的话,还请提供更详细点的信息我们排查并保护一下。

@HarrisonXi
Copy link
Contributor

关于 scroll 容器的问题,参照 #39

@HarrisonXi
Copy link
Contributor

计时器的问题已收到,后续会进行修复

@HarrisonXi
Copy link
Contributor

最后一个 aspectRatio 的问题图裂了

@HarrisonXi
Copy link
Contributor

另外不同的文件建议分开多个 issue 提问

@xian-zh
Copy link
Author

xian-zh commented Jan 30, 2018

好的最后一我重新开issue

@xian-zh
Copy link
Author

xian-zh commented Jan 30, 2018

container-banner 容器,在android 有container-banner这个type,iOS没有导致我使用android的json文件中没找布局类型致时布局数组索引越界崩溃
wx20180130-170638

@HarrisonXi
Copy link
Contributor

这个崩溃问题是上层代码没有做保护导致的,并不是 SDK 内部问题。

写 demo 的时候比较随意,没有做这些保护。自己写代码的时候最好做一些保护。

@halfrisk
Copy link

我也测试发现了此问题,如果Android与ios支持类型不一致,这样将不能只维护一套json配置文件了,有什么好的解决办法?

@xian-zh xian-zh closed this as completed Feb 26, 2018
@GitChenM
Copy link

ios坑有点多啊,这样搞,反而更麻烦了

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

4 participants