Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import SwiftUI
- struct CustomVStack<Content: View>: View {
- let content: () -> Content
- init(@ViewBuilder content: @escaping () -> Content) {
- self.content = content
- }
- var body: some View {
- VStack(spacing: 0) {
- content()
- }
- }
- }
- struct CustomVStack_Previews: PreviewProvider {
- static var previews: some View {
- CustomVStack {
- Text("1")
- Text("2")
- Text("3")
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement