Skip to content

Commit e85582e

Browse files
committed
新增sloganWidth, sloganHeight 接口。
1 parent dbd2275 commit e85582e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

ios/Classes/JverifyPlugin.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -540,8 +540,8 @@ - (void)setCustomUIWithUIConfig:(JVUIConfig *)uiconfig configArguments:(NSDictio
540540
}else{
541541
JVLayoutConstraint *slogan_cons_top = JVLayoutTop([sloganOffsetY floatValue], sloganLayoutItem,NSLayoutAttributeBottom);
542542
JVLayoutConstraint *slogan_cons_centerx = JVLayoutCenterX([sloganOffsetX floatValue]);
543-
CGFloat sloganH = sloganHeight?[sloganHeight floatValue]:20;
544-
CGFloat sloganW = sloganWidth?[sloganWidth floatValue]:200;
543+
CGFloat sloganH = [sloganHeight floatValue]>0?:20;
544+
CGFloat sloganW = [sloganWidth floatValue]>0?:200;
545545
JVLayoutConstraint *slogan_cons_width = JVLayoutWidth(sloganW);
546546
JVLayoutConstraint *slogan_cons_height = JVLayoutHeight(sloganH);
547547
uiconfig.sloganConstraints = @[slogan_cons_top,slogan_cons_centerx,slogan_cons_width,slogan_cons_height];

lib/jverify.dart

+5
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,9 @@ class JVUIConfig {
488488
JVIOSLayoutItem sloganVerticalLayoutItem;
489489
int sloganTextColor;
490490
int sloganTextSize;
491+
int sloganWidth;
492+
int sloganHeight;
493+
491494
bool sloganHidden = false;
492495

493496
/// 登录按钮
@@ -613,6 +616,8 @@ class JVUIConfig {
613616
"sloganOffsetX": sloganOffsetX ??= null,
614617
"sloganVerticalLayoutItem": getStringFromEnum(sloganVerticalLayoutItem),
615618
"sloganTextSize": sloganTextSize ??= null,
619+
"sloganWidth": sloganWidth ??= null,
620+
"sloganHeight": sloganHeight ??= null,
616621
"sloganHidden": sloganHidden,
617622
"privacyState": privacyState,
618623
"privacyCheckboxInCenter": privacyCheckboxInCenter,

0 commit comments

Comments
 (0)