Skip to content

Commit 157c3b7

Browse files
authored
Merge pull request #253 from Esri/Ting/Fix-InfoPicker
[Update] Adjust info view control size
2 parents ff79adc + dbbed15 commit 157c3b7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Shared/Supporting Files/Views/SampleInfoView.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ struct SampleInfoView: View {
4343
}
4444
}
4545
.pickerStyle(.segmented)
46+
// Set the ideal width to a big value so the segmented control
47+
// takes up the entire empty space of the toolbar on iOS 17.
48+
.frame(idealWidth: UIScreen.main.bounds.width)
4649
}
4750

4851
ToolbarItem(placement: .confirmationAction) {
@@ -51,13 +54,15 @@ struct SampleInfoView: View {
5154
}
5255
}
5356

54-
ToolbarItem(placement: .bottomBar) {
57+
ToolbarItemGroup(placement: .bottomBar) {
5558
if informationMode == .code {
59+
Spacer()
5660
Picker("Source Code File Picker", selection: $selectedSnippetIndex) {
5761
ForEach(sample.snippetURLs.indices, id: \.self) { index in
5862
Text(sample.snippets[index].dropLast(6))
5963
}
6064
}
65+
Spacer()
6166
}
6267
}
6368
}

0 commit comments

Comments
 (0)