增加iOS useNativeLiveComponent配置
parent
6bf91b716a
commit
a03efa8ae2
|
@ -73,6 +73,7 @@
|
|||
NSError* error = nil;
|
||||
FATUIConfig *uiconfig = [[FATUIConfig alloc]init];
|
||||
if (_uiConfig) {
|
||||
// 导航栏配置
|
||||
if (_uiConfig[@"navigationTitleTextAttributes"]) {
|
||||
uiconfig.navigationTitleTextAttributes = _uiConfig[@"navigationTitleTextAttributes"];
|
||||
}
|
||||
|
@ -90,28 +91,20 @@
|
|||
if (_uiConfig[@"navigationBarBackBtnDarkColor"]) {
|
||||
uiconfig.navigationBarBackBtnDarkColor = [MOPTools colorWithRGBHex:[_uiConfig[@"navigationBarBackBtnDarkColor"] intValue]];
|
||||
}
|
||||
|
||||
// 更多视图配置
|
||||
uiconfig.moreMenuStyle = [_uiConfig[@"moreMenuStyle"] integerValue];
|
||||
uiconfig.hideBackToHomePriority = [_uiConfig[@"isHideBackHomePriority"] integerValue];
|
||||
uiconfig.hideFeedbackMenu = [_uiConfig[@"isHideFeedbackAndComplaints"] boolValue];
|
||||
uiconfig.hideBackToHome = [_uiConfig[@"isHideBackHome"] boolValue];
|
||||
uiconfig.hideForwardMenu = [_uiConfig[@"isHideForwardMenu"] boolValue];
|
||||
uiconfig.hideShareAppletMenu = [_uiConfig[@"isHideShareAppletMenu"] boolValue];
|
||||
uiconfig.hideRefreshMenu = [_uiConfig[@"isHideRefreshMenu"] boolValue];
|
||||
uiconfig.hideTransitionCloseButton = [_uiConfig[@"hideTransitionCloseButton"] boolValue];
|
||||
uiconfig.disableSlideCloseAppletGesture = [_uiConfig[@"disableSlideCloseAppletGesture"] boolValue];
|
||||
if (_uiConfig[@"webViewProgressBarColor"]) {
|
||||
uiconfig.progressBarColor = [MOPTools colorWithRGBHex:[_uiConfig[@"webViewProgressBarColor"] intValue]];
|
||||
}
|
||||
|
||||
uiconfig.hideFeedbackMenu = [_uiConfig[@"isHideFeedbackAndComplaints"] boolValue];
|
||||
uiconfig.hideForwardMenu = [_uiConfig[@"isHideForwardMenu"] boolValue];
|
||||
uiconfig.autoAdaptDarkMode = [_uiConfig[@"autoAdaptDarkMode"] boolValue];
|
||||
uiconfig.hideSettingMenu = [_uiConfig[@"isHideSettingMenu"] boolValue];
|
||||
uiconfig.hideFeedbackMenu = [_uiConfig[@"isHideFeedbackAndComplaints"] boolValue];
|
||||
uiconfig.hideRefreshMenu = [_uiConfig[@"isHideRefreshMenu"] boolValue];
|
||||
uiconfig.hideFavoriteMenu = [_uiConfig[@"isHideFavoriteMenu"] boolValue];
|
||||
uiconfig.hideAddToDesktopMenu = [_uiConfig[@"isHideAddToDesktopMenu"] boolValue];
|
||||
|
||||
uiconfig.appletText = _uiConfig[@"appletText"];
|
||||
uiconfig.disableSlideCloseAppletGesture = [_uiConfig[@"disableSlideCloseAppletGesture"] boolValue];
|
||||
// 胶囊配置
|
||||
if (_uiConfig[@"capsuleConfig"]) {
|
||||
NSDictionary *capsuleConfigDic = _uiConfig[@"capsuleConfig"];
|
||||
FATCapsuleConfig *capsuleConfig = [[FATCapsuleConfig alloc]init];
|
||||
|
@ -133,8 +126,8 @@
|
|||
capsuleConfig.capsuleDividerLightColor = [MOPTools colorWithRGBHex:[capsuleConfigDic[@"capsuleDividerLightColor"] intValue]];
|
||||
capsuleConfig.capsuleDividerDarkColor = [MOPTools colorWithRGBHex:[capsuleConfigDic[@"capsuleDividerDarkColor"] intValue]];
|
||||
uiconfig.capsuleConfig = capsuleConfig;
|
||||
|
||||
}
|
||||
uiconfig.hideTransitionCloseButton = [_uiConfig[@"hideTransitionCloseButton"] boolValue];
|
||||
|
||||
if (_uiConfig[@"navHomeConfig"]) {
|
||||
NSDictionary *navHomeConfigDic = _uiConfig[@"navHomeConfig"];
|
||||
|
@ -243,15 +236,19 @@
|
|||
|
||||
uiconfig.authViewConfig = authViewConfig;
|
||||
}
|
||||
uiconfig.appendingCustomUserAgent = _uiConfig[@"customWebViewUserAgent"];
|
||||
uiconfig.hideWebViewProgressBar = [_uiConfig[@"hideWebViewProgressBar"] boolValue];
|
||||
uiconfig.autoAdaptDarkMode = [_uiConfig[@"autoAdaptDarkMode"] boolValue];
|
||||
uiconfig.transtionStyle = [_uiConfig[@"transtionStyle"] integerValue];
|
||||
uiconfig.disableSlideCloseAppletGesture = [_uiConfig[@"disableSlideCloseAppletGesture"] boolValue];
|
||||
if (_uiConfig[@"webViewProgressBarColor"]) {
|
||||
uiconfig.progressBarColor = [MOPTools colorWithRGBHex:[_uiConfig[@"webViewProgressBarColor"] intValue]];
|
||||
}
|
||||
uiconfig.hideWebViewProgressBar = [_uiConfig[@"hideWebViewProgressBar"] boolValue];
|
||||
|
||||
uiconfig.appletText = _uiConfig[@"appletText"];
|
||||
uiconfig.appendingCustomUserAgent = _uiConfig[@"customWebViewUserAgent"];
|
||||
uiconfig.autoAdaptDarkMode = [_uiConfig[@"autoAdaptDarkMode"] boolValue];
|
||||
uiConfig.useNativeLiveComponent = [_uiConfig[@"useNativeLiveComponent"] boolValue];
|
||||
}
|
||||
|
||||
|
||||
|
||||
// uiconfig.moreMenuStyle = FATMoreViewStyleNormal;
|
||||
[[FATClient sharedClient] initWithConfig:config uiConfig:uiconfig error:&error];
|
||||
if (error) {
|
||||
failure(@"初始化失败");
|
||||
|
@ -267,8 +264,6 @@
|
|||
[[FATClient sharedClient].logManager initLogWithLogDir:logDir logLevel:logLevel consoleLog:YES];
|
||||
}
|
||||
|
||||
|
||||
|
||||
[[FATClient sharedClient] setEnableLog:YES];
|
||||
|
||||
success(@{});
|
||||
|
|
|
@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk.
|
|||
s.dependency 'Flutter'
|
||||
s.ios.deployment_target = '9.0'
|
||||
|
||||
s.dependency 'FinApplet' , '2.40.3'
|
||||
s.dependency 'FinAppletExt' , '2.40.3'
|
||||
s.dependency 'FinApplet' , '2.40.4-dev20230422v01'
|
||||
s.dependency 'FinAppletExt' , '2.40.4-dev20230422v01'
|
||||
end
|
||||
|
||||
|
|
|
@ -328,7 +328,8 @@ class UIConfig {
|
|||
// 是否自适应暗黑模式。如果设置为true,则更多页面、关于等原生页面会随着手机切换暗黑,也自动调整为暗黑模式
|
||||
bool autoAdaptDarkMode = false;
|
||||
|
||||
// 是否使用内置的live组件
|
||||
// 是否使用内置的live组件,默认为false。(目前仅iOS支持)
|
||||
// 配置为true时,需要依赖Live扩展SDK。
|
||||
bool useNativeLiveComponent = false;
|
||||
|
||||
// 要拼接的userAgent字符串
|
||||
|
|
Loading…
Reference in New Issue