extension View {
/// 프린트 출력 메소드
func testPrint(_ vars: Any...) -> some View {
for v in vars {
print(v)
}
return EmptyView()
}
}
struct ContentView: View {
var body: some View {
ScrollView{
VStack(spacing: 50){
Text("Hello, world!")
.padding()
testPrint("하하하하")
Button {
print("정대리 유튭 구독하기")
} label: {
Text("구독 & 좋아요!")
}
}
}
}
}