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

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

Merged
merged 1 commit into from Nov 9, 2017

Conversation

Projects
None yet
4 participants
@acton393
Member

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

[WEEX-94][iOS] fix iOS 8 scrollview assign delegate crash
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

This comment has been minimized.

Show comment
Hide comment
@weex-bot

weex-bot Nov 7, 2017

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

Generated by 🚫 dangerJS

weex-bot commented Nov 7, 2017

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

Generated by 🚫 dangerJS

@cxfeng1

cxfeng1 approved these changes Nov 8, 2017

@cxfeng1

This comment has been minimized.

Show comment
Hide comment
@cxfeng1

cxfeng1 Nov 8, 2017

Member

LGTM

Member

cxfeng1 commented Nov 8, 2017

LGTM

@asfgit asfgit merged commit e0564d1 into apache:master Nov 9, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment