K
Size: a a a
АС
BS
BS
AT
АС
АС
imageView.af.setImage(withURL: (pic ?? URL(string: ""))!, placeholderImage: .none)AT
imageView.af.setImage(withURL: (pic ?? URL(string: ""))!, placeholderImage: .none)АС
ДМ
TistView {
var body: some View {
Color.red
}
}
struct BioView: View {
var body: some View {
Color.red
}
}
struct TestView: View {
@State private var biology = false
@State private var test = false
var body: some View {
ZStack {
Color( colorLiteral(red: 0.8509803922, green: 0.9529411765, blue: 1, alpha: 1))
.edgesIgnoringSafeArea(.all)
ScrollView(.vertical, showsIndicators: false) {
VStack {
ForEach(biolData) { item in
bioView(biol: item)
}
}
}
}
}
}
struct TestView_Previews: PreviewProvider {
static var previews: some View {
TestView()
}
}
struct bioView: View {
@State private var biology = false
var biol: Biol
var body: some View {
VStack(alignment: .leading) {
Button(action: {
self.biology.toggle()
}) {
Text(biol.text)
}.sheet(isPresented: $biology) {
BioView()
}
.foregroundColor(.black)
Spacer()
}
}
}
struct Biol: Identifiable {
var id = UUID()
var text: String
}
let biolData = [
Biol (text: "Биология"),
Biol (text: "Химия")
] как сделать разное View через Extract Subview?DT

x

DT
NK
DA
ДМ
NK