Наложение не прокручивается с помощью UITableView - iOS
У меня есть класс UITableView, который использует следующие методы для вызова наложения загрузки при переходе к следующему экрану. Проблема состоит в том, что этот экран загрузки не прокручивается со списком ... Так что, если вы прокрутите немного и нажмете что-то, экран загрузки не будет отображаться (потому что он вверху). Как сделать так, чтобы экран загрузки всегда оставался поверх UITableView? Пожалуйста, знайте, что каждый UITableView содержится в UINavBar, который содержится в UITabBar. Вот мой код:
<code>-(void)createLoadScreen { CGRect screenRect = [self.view bounds]; CGRect overlayFrame = CGRectMake(0.0, 0.0, screenRect.size.width, screenRect.size.height); overlay = [[UIView alloc] initWithFrame:overlayFrame]; overlay.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.7]; CGRect frame = CGRectMake(screenRect.size.width / 2 - 25.0, screenRect.size.height / 2 - 70, 25.0, 25.0); loading = [[UIActivityIndicatorView alloc] initWithFrame:frame]; [loading setActivityIndicatorViewStyle:UIActivityIndicatorViewStyleWhiteLarge]; [loading sizeToFit]; loading.autoresizingMask = (UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin); loading.hidesWhenStopped = YES; [overlay addSubview:loading]; } -(void)showActivityIndicator { [self.view addSubview:overlay]; [loading startAnimating]; } -(void)removeActivityIndicator { [loading stopAnimating]; [overlay removeFromSuperview]; } </code>