Skip to content

Commit 632cc32

Browse files
committed
默认按钮优化
Change-Id: I38c5f275d759b862828c2b492c3da0f14ccd91b6
1 parent 0b73c1e commit 632cc32

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Source/LinkSDK/QCAPISets/Public/TIoTCoreDeviceSet.m

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,18 @@ - (void)zipData:(NSDictionary *)uiInfo baseInfo:(NSDictionary *)baseInfo deviceD
136136
[propertiesForUI addObject:proper];
137137
}
138138

139+
// 如果是第一次初始化,取第一个不为struct类型的属性为大按钮
140+
if (propertiesForUI.count > 0) {
141+
NSMutableDictionary *proper = propertiesForUI[0];
142+
NSString *protoid = proper[@"id"];
143+
if (![protoid containsString:@"_call_status"]) {
144+
145+
[proper setValue:@{@"icon": @"create", @"type": @"btn-big", @"visible": @1} forKey:@"ui"];
146+
self.bigProp = proper;
147+
[propertiesForUI removeObject:proper];
148+
}
149+
150+
}
139151

140152
[self.allProperties addObjectsFromArray:propertiesForUI];
141153
[self.properties addObjectsFromArray:propertiesForUI];

0 commit comments

Comments
 (0)