Код: Выделить всё
struct feedView: View {
var body: some View {
NavigationStack {
ScrollView {
//Story grid
ScrollView(.horizontal, showsIndicators: false) {
LazyHStack(content: {
ForEach(1...20, id: \.self) { count in
Circle()
.fill(.yellow)
.frame(width: 70, height: 70)
}
})
}
.frame(height: 100)
.background(.blue)
//Feed Vgrid
LazyVStack(spacing: 30, content: {
ForEach(0...16, id: \.self) { count in
FeedCell()
}
})
.padding(.top, 8)
}
.navigationTitle("Feed")
.navigationBarTitleDisplayMode(.inline)
.toolbar(content: {
ToolbarItem(placement: .topBarLeading) {
Image("instagram-text-icon")
.resizable()
.frame(width: 100, height: 100)
}
ToolbarItem(placement: .topBarTrailing) {
Image(systemName: "paperplane")
.imageScale(.large)
}
})
}
}
Подробнее здесь: https://stackoverflow.com/questions/791 ... -works-fin
Мобильная версия