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

[WEEX-94][iOS] fix iOS 8 scrollview assign delegate crash #838

Merged

Conversation

acton393
Copy link
Member

@acton393 acton393 commented Nov 7, 2017

As iOS developers all knowns, assign property will not be set nil when
its object deallocated, and weak object will does, so we must set it to the
nil value, in case of crash about messaging to zombie object. In iOS 8 and
the older iOS, the property of delegate of UIScrollView is assign, so we
must set it to nil manually when object deallocated. And in iOS 9 and later
iOS, apple change the delegate property of UIScrollView it to weak, so we
don't set it to nil value any more. For compatibility on iOS 8, here we must
set it to nil value.

Bug: 94

As iOS developers all knowns, assign property will not be set nil when its
object deallocated, and weak object will does, so we must set it to the nil
value, in case of crash about messaging to zombie object. In iOS 8 and
the older iOS, the property of delegate of UIScrollView is assign, so we
must set it to nil manually when object deallocated. And in iOS 9 and later
iOS, apple change the delegate property of UIScrollView it to weak, so we
don't set it to nil value any more. For compatibility on iOS 8, here we must
set it to nil value.

Bug: 94
@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 e0564d1 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