반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- bit
- map
- UE5
- css
- 비트연산
- count
- treenode
- priority_queue
- MySQL
- axios
- component
- queue
- Context
- state
- leetcode
- Callback
- array
- event
- node.js
- React
- nodeJS
- Navigation
- BinaryTree
- c++
- server
- routes
- DP
- Props
- JSX
- route
Archives
- Today
- Total
우사미 코딩
동적으로 Stack 변환하기 본문
반응형
@State var myLayout: AnyLayout = AnyLayout(VStackLayout())
var body: some View {
VStack{
myLayout {
Image(systemName: "goforward.10")
.resizable()
.aspectRatio(contentMode: .fit)
Image(systemName: "goforward.10")
.resizable()
.aspectRatio(contentMode: .fit)
}
HStack{
Button(action: {
myLayout = AnyLayout(HStackLayout())}){
Text("HStack")
}
Button(action: {
myLayout = AnyLayout(VStackLayout())}){
Text("VStack")
}
}
}
}
반응형
'Programming (C++) > XCode, SwiftUI' 카테고리의 다른 글
NavigationStack에 Path 설정하기 (0) | 2024.07.14 |
---|---|
동기 await, async (0) | 2024.07.10 |
Environment, ObservableObject (0) | 2024.07.08 |
하위 View에 프로퍼티 전달하기 (바인딩) (0) | 2024.07.08 |
Comments