Skip to content

Commit

Permalink
TIMOB-4198 : The default for userinteraction is yes unless manually d…
Browse files Browse the repository at this point in the history
…isabled.
  • Loading branch information
Blain Hamon committed Jun 21, 2011
1 parent 5c5bcca commit c6d728b
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions iphone/Classes/TiUIView.m
Expand Up @@ -1018,11 +1018,6 @@ -(void)handleListenerAddedWithEvent:(NSString *)event
handlesSwipes = YES;
}

if (handlesTouches || handlesTaps || handlesSwipes)
{
self.userInteractionEnabled = YES;
}

if (handlesTaps)
{
self.multipleTouchEnabled = YES;
Expand All @@ -1034,7 +1029,6 @@ -(void)handleListenerRemovedWithEvent:(NSString *)event
ENSURE_UI_THREAD_1_ARG(event);
// unfortunately on a remove, we have to check all of them
// since we might be removing one but we still have others
BOOL needsUpdate = NO;

if (handlesTouches &&
[self.proxy _hasListeners:@"touchstart"]==NO &&
Expand All @@ -1044,29 +1038,20 @@ -(void)handleListenerRemovedWithEvent:(NSString *)event
[self.proxy _hasListeners:@"click"]==NO &&
[self.proxy _hasListeners:@"dblclick"]==NO)
{
needsUpdate = YES;
handlesTouches = NO;
}
if (handlesTaps &&
[self.proxy _hasListeners:@"singletap"]==NO &&
[self.proxy _hasListeners:@"doubletap"]==NO &&
[self.proxy _hasListeners:@"twofingertap"]==NO)
{
needsUpdate = YES;
handlesTaps = NO;
}
if (handlesSwipes &&
[event isEqualToString:@"swipe"])
{
needsUpdate = YES;
handlesSwipes = NO;
}

if (needsUpdate && handlesTaps == NO && handlesTouches == NO)
{
self.userInteractionEnabled = NO;
self.multipleTouchEnabled = NO;
}
}


Expand Down

0 comments on commit c6d728b

Please sign in to comment.