ZStack {
VStack {
Text("PlaceHolder")
.foregroundColor(.gray)
.frame(maxWidth: .infinity, alignment: .topLeading)
.padding(.top, 10).padding(.leading, 10)
Spacer()
}
TextEditor(text: $txt)
.frame(maxWidth: .infinity, maxHeight: 80)
.frame(height:60)
.padding(.horizontal, 5.0)
.opacity(txt.isEmpty ? 0.25 : 1)
}
.overlay(RoundedRectangle(cornerRadius: 5.0)
.stroke(lineWidth: 2.0))
}
댓글
댓글 쓰기