Код: Выделить всё
ContentViewКод: Выделить всё
seems to beКод: Выделить всё
struct ContentView: View {
@State var show: Bool = false
var body: some View {
Button {
show = true
} label: {
Image(systemName: "bubble.fill")
.imageScale(.large)
.padding()
}
.sheet(isPresented: $show) {
SheetView()
}
}
}
struct SheetView: View {
@State var tips = TipGroup(.ordered) {
SampleTip()
OtherTip()
}
var body: some View {
Text("Sheet")
.popoverTip(tips.currentTip)
}
}
< /code>
Это (самые основные) советы (вы можете подумать): < /p>
struct SampleTip: Tip {
var title: Text {
Text("Sample Tip")
}
}
struct OtherTip: Tip {
var title: Text {
Text("Other Tip")
}
}
< /code>
Это весь код, который у меня есть - за исключением попыток? Tips.configure () Подробнее здесь: https://stackoverflow.com/questions/797 ... in-swiftui
Мобильная версия