You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@weex.apache.org by "XuYouyang (JIRA)" <ji...@apache.org> on 2018/07/04 03:45:00 UTC

[jira] [Commented] (WEEX-491) navigator 是否能增加清除页面栈的方法?

    [ https://issues.apache.org/jira/browse/WEEX-491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16532206#comment-16532206 ] 

XuYouyang commented on WEEX-491:
--------------------------------

[~weifengsmile] we use 'WXNavigationProtocol' to handler page jump. In weex sdk, we implement this protocol in class 'WXNavigationDefaultImpl'. So I think maybe you have two solutions:

1. add method like ' - (void)setViewControllers:(NSArray<UIViewController *> *)viewControllers animated:(BOOL)animated ' in 'WXNavigationDefaultImpl' to set page in navigation directly. But setting pages in page pushing process may cause unpredictable problems.

2. register a new hanler which implement 'WXNavigationProtocol', detecting system memory or page count in current navigation and removing previous pages in page pushing method.

> navigator 是否能增加清除页面栈的方法?
> ------------------------
>
>                 Key: WEEX-491
>                 URL: https://issues.apache.org/jira/browse/WEEX-491
>             Project: Weex
>          Issue Type: Wish
>          Components: Android, iOS
>            Reporter: weifengsmile
>            Assignee: codefurture
>            Priority: Major
>              Labels: easyfix
>
> 目前的navigator模块,做跳转时只能push,pop,open或close,并不能清除之前的页面栈,所以能不能增加这个功能,否则在某些场景,页面可能被无限push导致堆栈内存占用不断增加最终OOM
> 或者说,目前有什么方案可以解决这个问题吗?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)