This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Apple Forum Question https://developer.apple.com/forums/thread/129211?answerId=620460022#620460022 | |
| // | |
| // SceneDelegate.swift | |
| // | |
| // Created by Egor Merkushev on 11.07.2020. | |
| // Copyright © 2020 Egor Merkushev. All rights reserved. | |
| // | |
| import UIKit | |
| import SwiftUI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // ContentView.swift | |
| // DeleteMe | |
| // | |
| // Created by Chris Eidhof on 02.02.21. | |
| // | |
| import SwiftUI | |
| /* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import SwiftUI | |
| import Combine | |
| struct AdaptsToSoftwareKeyboard: ViewModifier { | |
| @State var currentHeight: CGFloat = 0 | |
| func body(content: Content) -> some View { | |
| content | |
| .padding(.bottom, currentHeight) | |
| .edgesIgnoringSafeArea(.bottom) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // ContentView.swift | |
| // Layout | |
| // | |
| // Created by Matt Gallagher on 7/6/19. | |
| // Copyright © 2019 Matt Gallagher. All rights reserved. | |
| // | |
| import SwiftUI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct ContentView: View { | |
| @State var count: Int = 3 | |
| var body: some View { | |
| return NavigationView { | |
| VStack(spacing: 50) { | |
| HStack { | |
| Button(action: { self.count += 1 }) { | |
| Text("Add") | |
| } |