native-docs icon indicating copy to clipboard operation
native-docs copied to clipboard

splashViewForApp 闪屏页自定义动画无效

Open YiFan-Tong opened this issue 4 years ago • 0 comments

问题描述 iOS端:DCUniMPSDKEngineDelegate里面方法 /// 返回打开小程序时的闪屏视图 /// @param appid appid

  • (UIView *)splashViewForApp:(NSString *)appid;

在这个代理方法里面的splashView中代码添加自定义加载动画无效,尝试在其他UIview中添加,动画是没有问题的

同一个页面,我直接在一个viewcontroller的view上添加,是有效的,代码如下,直接addSubview

 UIView *splashView = [[[NSBundle mainBundle] loadNibNamed:@"SplashView" owner:self options:nil] lastObject];
    [self.view addSubview:splashView];

但是我放到UNI提供的代理方法中,就不行了,动画效果丧失:

/// 返回打开小程序时的自定义闪屏视图
- (UIView *)splashViewForApp:(NSString *)appid {
    UIView *splashView = [[[NSBundle mainBundle] loadNibNamed:@"SplashView" owner:self options:nil] lastObject];
    return splashView;
}

猜测,是这个代理方法做了什么吗?

YiFan-Tong avatar Jun 18 '20 07:06 YiFan-Tong