zioinfo-mail/app/node_modules/expo-splash-screen/ios/EXSplashScreen/EXSplashScreenViewController.m
DESKTOP-TKLFCPR\ython 11c670f2a0 refactor: 101.79.17.164 → zioinfo.co.kr 전체 도메인 변환 + Manager UI 배포
- 37개 파일 IP → zioinfo.co.kr 치환 (소스/매뉴얼/설정/하네스)
- Manager DrConsole/NetworkConsole/CsapConsole 빌드 + /var/www/manager/ 배포
- 테스트: Manager HTTP 200, ITSM 신규 API 7개 전체 200

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 10:09:17 +09:00

104 lines
2.5 KiB
Objective-C

// Copyright © 2018 650 Industries. All rights reserved.
#import <EXSplashScreen/EXSplashScreenViewController.h>
#import <ExpoModulesCore/EXDefines.h>
#import <ExpoModulesCore/EXUtilities.h>
@interface EXSplashScreenViewController ()
@property (nonatomic, weak) UIView *rootView;
@property (nonatomic, assign) BOOL autoHideEnabled;
@property (nonatomic, assign) BOOL splashScreenShown;
@property (nonatomic, assign) BOOL appContentAppeared;
@end
@implementation EXSplashScreenViewController
- (instancetype)initWithRootView:(UIView *)rootView splashScreenView:(nonnull UIView *)splashScreenView
{
if (self = [super init]) {
_rootView = rootView;
_autoHideEnabled = YES;
_splashScreenShown = NO;
_appContentAppeared = NO;
_splashScreenView = splashScreenView;
}
return self;
}
# pragma mark public methods
- (void)showWithCallback:(void (^)(void))successCallback failureCallback:(void (^)(NSString * _Nonnull))failureCallback
{
[self showWithCallback:successCallback];
}
- (void)showWithCallback:(nullable void(^)(void))successCallback
{
[EXUtilities performSynchronouslyOnMainThread:^{
UIView *rootView = self.rootView;
self.splashScreenView.frame = rootView.bounds;
[rootView addSubview:self.splashScreenView];
self.splashScreenShown = YES;
if (successCallback) {
successCallback();
}
}];
}
- (void)preventAutoHideWithCallback:(void (^)(BOOL))successCallback failureCallback:(void (^)(NSString * _Nonnull))failureCallback
{
if (!_autoHideEnabled) {
return successCallback(NO);
}
_autoHideEnabled = NO;
successCallback(YES);
}
- (void)hideWithCallback:(void (^)(BOOL))successCallback failureCallback:(void (^)(NSString * _Nonnull))failureCallback
{
if (!_splashScreenShown) {
return successCallback(NO);
}
[self hideWithCallback:successCallback];
}
- (void)hideWithCallback:(nullable void(^)(BOOL))successCallback
{
EX_WEAKIFY(self);
dispatch_async(dispatch_get_main_queue(), ^{
EX_ENSURE_STRONGIFY(self);
[self.splashScreenView removeFromSuperview];
self.splashScreenShown = NO;
self.autoHideEnabled = YES;
if (successCallback) {
successCallback(YES);
}
});
}
- (BOOL)needsHideOnAppContentDidAppear
{
if (!_appContentAppeared && _autoHideEnabled) {
_appContentAppeared = YES;
return YES;
}
return NO;
}
- (BOOL)needsShowOnAppContentWillReload
{
if (!_appContentAppeared) {
_autoHideEnabled = YES;
_appContentAppeared = NO;
return YES;
}
return NO;
}
@end