You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@weex.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/11/07 17:21:00 UTC

[jira] [Commented] (WEEX-98) addEvent will lead to view load again, especially the view just re-used for memory usage

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

ASF GitHub Bot commented on WEEX-98:
------------------------------------

GitHub user acton393 opened a pull request:

    https://github.com/apache/incubator-weex/pull/837

    [WEEX-98][iOS]bug-fix addEvent lead to generate a new view while it as been recycled

    
      In most case , element in cell will be re-use for memory especially in very
    long list, but if add event for this element, here will generate a new view for
    this element,if it's nil due to a  getter method whether it is off-screen.
    
      For instance, image element in cell will re-use if it is disappear in vision area,
    loaded again while it back to visual area. In this case , when it disappear, just
    add event such as click, touch and so on , it will then create a new view,
    and load image again, although it is off-screen.
    
      If the view is not loaded, so won't add gesture or call this view getter to create
    any view until the view is loaded, then it will init events according to record in
    component.
    
    Bug: 98


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/acton393/incubator-weex ios-bugfix-event-leadToView-loaded-again

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-weex/pull/837.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #837
    
----
commit 62677d7cffd2c94abfd4d82e5b3797f65872f91e
Author: acton393 <zh...@gmail.com>
Date:   2017-11-07T17:18:26Z

    [WEEX-98][iOS]bug-fix addEvent lead to generate a new view while it has been recycled
    
      In most case , element in cell will be re-use for memory especially in very
    long list, but if add event for this element, here will generate a new view for
    this element,if it's nil due to a  getter method whether it is off-screen.
    
      For instance, image element in cell will re-use if it is disappear in vision area,
    loaded again while it back to visual area. In this case , when it disappear, just
    add event such as click, touch and so on , it will then create a new view,
    and load image again, although it is off-screen.
    
      If the view is not loaded, so won't add gesture or call this view getter to create
    any view until the view is loaded, then it will init events according to record in
    component.
    
    Bug: 98

----


> addEvent will lead to view load again, especially the view just re-used for memory usage
> ----------------------------------------------------------------------------------------
>
>                 Key: WEEX-98
>                 URL: https://issues.apache.org/jira/browse/WEEX-98
>             Project: Weex
>          Issue Type: Bug
>          Components: iOS
>            Reporter: xingZhang
>            Assignee: Adam Feng
>
>   In most case , element in cell will be re-use for memory especially in very long list, but if I call addEvent for this element, here will generate a new view for this element.
>  For instance, image element in cell  will re-use if it is disappear in vision area, and loaded again while it back to visual area. In this case , when it disappear, just add event such as click, touch and so on , it will then generate a new view ,and load image again, although it is off-screen.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)