Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

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

Merged

Conversation

acton393
Copy link
Member

@acton393 acton393 commented Nov 7, 2017

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

…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
@weex-bot
Copy link

weex-bot commented Nov 7, 2017

Messages
📖 has no android file changed.
📖 android test finished.

Generated by 🚫 dangerJS

@cxfeng1-zz
Copy link
Contributor

LGTM

@asfgit asfgit merged commit 62677d7 into apache:master Nov 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants