Skip to content

Commit

Permalink
iOS: remove some code which could affect the state of UIViews that ar…
Browse files Browse the repository at this point in the history
…en't owned by SDL.

It was originally added to work around an input event problem in the code of a specific app which mixed SDL and native UIViews, but that app solved its problems in a better manner since then.
  • Loading branch information
slime73 committed Jun 16, 2019
1 parent fffa791 commit f4625f5
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions src/video/uikit/SDL_uikitview.m
Expand Up @@ -80,27 +80,6 @@ - (instancetype)initWithFrame:(CGRect)frame
return self;
}

- (void)layoutSubviews
{
// Fix for touch ios.
#if TARGET_OS_IOS
// on ios, a metal view gets added to our parent, and covers this for touch events.
// So set ourselves to user interact, and siblings false. johna
NSArray<UIView*>* subviews = [self.superview subviews];
for (int i=0; i<[subviews count]; i++)
{
UIView *view = [subviews objectAtIndex:i];
if (view == self) {
[view setUserInteractionEnabled:YES]; // set our user interaction to true.
} else {
[view setUserInteractionEnabled:NO]; // siblings to false.
}
}
#endif
[super layoutSubviews];
}


- (void)setSDLWindow:(SDL_Window *)window
{
SDL_WindowData *data = nil;
Expand Down

0 comments on commit f4625f5

Please sign in to comment.