iOS: remove some code which could affect the state of UIViews that aren't owned by SDL.
authorAlex Szpakowski <slime73@gmail.com>
Sun, 16 Jun 2019 13:52:27 -0300
changeset 12866286fefb0209c
parent 12865 a504364f02ee
child 12867 a38317a29191
iOS: remove some code which could affect the state of UIViews that aren'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.
src/video/uikit/SDL_uikitview.m
     1.1 --- a/src/video/uikit/SDL_uikitview.m	Fri Jun 14 22:29:13 2019 -0400
     1.2 +++ b/src/video/uikit/SDL_uikitview.m	Sun Jun 16 13:52:27 2019 -0300
     1.3 @@ -80,27 +80,6 @@
     1.4      return self;
     1.5  }
     1.6  
     1.7 -- (void)layoutSubviews
     1.8 -{
     1.9 -	// Fix for touch ios.
    1.10 -#if TARGET_OS_IOS
    1.11 -	// on ios, a metal view gets added to our parent, and covers this for touch events.
    1.12 -	// So set ourselves to user interact, and siblings false. johna
    1.13 -	NSArray<UIView*>* subviews = [self.superview subviews];
    1.14 -	for (int i=0; i<[subviews count]; i++)
    1.15 -	{
    1.16 -		UIView *view = [subviews objectAtIndex:i];
    1.17 -		if (view == self) {
    1.18 -			[view setUserInteractionEnabled:YES];  // set our user interaction to true.
    1.19 -		} else {
    1.20 -			[view setUserInteractionEnabled:NO];  // siblings to false.
    1.21 -		}
    1.22 -	}
    1.23 -#endif
    1.24 -    [super layoutSubviews];
    1.25 -}
    1.26 -
    1.27 -
    1.28  - (void)setSDLWindow:(SDL_Window *)window
    1.29  {
    1.30      SDL_WindowData *data = nil;