Skip to content
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

[TIMOB-16680] iOS: listView when views overlap itemclick event return wrong bindId #6211

Closed
wants to merge 1 commit into from

Conversation

yomybaby
Copy link
Contributor

Fix this issue TIMOB-16680

FindViewProxyWithBindIdContainingPoint function have to find bindId from front to back(reverse index).

@yomybaby yomybaby changed the title fix TIMOB-16680 iOS: listView when views overlap itemclick event return wrong bindId TIMOB-16680 iOS: listView when views overlap itemclick event return wrong bindId Oct 11, 2014
@ingo
Copy link
Contributor

ingo commented Oct 14, 2014

Thank you for the PR. We will review this shortly.

@ingo ingo changed the title TIMOB-16680 iOS: listView when views overlap itemclick event return wrong bindId [TIMOB-16680] iOS: listView when views overlap itemclick event return wrong bindId Nov 17, 2014
@Topener
Copy link
Sponsor Contributor

Topener commented Feb 9, 2015

Is there an update? "Shortly" shouldn't be months I guess :)

@ingo
Copy link
Contributor

ingo commented Feb 9, 2015

It's scheduled for an upcoming release so we will get to it...apologies, other items have come up.

@cheekiatng
Copy link
Contributor

Hey @yomybaby , thanks for the PR. While I'm reviewing, i tried the change you made but it doesn't fix TIMOB-16680. However, I noticed that in your code, you had a check for subview.userInteractionEnabled, may I know the reason for this? Because without this, it fixes it.

@yomybaby
Copy link
Contributor Author

yomybaby commented Jun 4, 2015

Hi @cheekiatng ,

About fix bug

This PR fix TIMOB-16680. Other guys said it on JIRA comment. I have not tested on SDK 4.x. What version you use?

About subview.userInteractionEnabled

if touchEnabled is false, the view doesn't react any touch action.
Look at below example. If you touch Item bindId should be 'viewA', even viewA is located behind viewB.

<ItemTemplate>
   <View bindId="viewA"></View>
   <View bindId="viewB" touchEnabled="false"></View>
</ItemTemplate>

@cheekiatng
Copy link
Contributor

Hi @yomybaby I was using 4.0.0.Beta4 when I reproduced this. Anyway, I think i understand what you mean now, about the usage of touchEnabled. Ok will do one final check before the merge! :)

if (!CGRectContainsPoint([view bounds], point)) {
return nil;
}
for (int i = [view.subviews count]-1; i >=0; i--){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put a (int) cast here, (int)[views.subviews count]-1
to remove Xcode warning.

@cheekiatng
Copy link
Contributor

Hi @yomybaby , please address comments. Also, please include the year 2015 in Copyright (c) 2013-2015 by Appcelerator in the top part of the file. Then I will be able to merge. Thanks for your contribution!

@ashcoding
Copy link
Contributor

Cherry-picked commit and addressed the comments: #6918

@ingo
Copy link
Contributor

ingo commented Jun 19, 2015

Closing as #6918 supplants this.

@ingo ingo closed this Jun 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants