Closed fatihdurmaz closed 1 year ago
// // LoginView.swift // ToDoList // // Created by Fatih Durmaz on 5.05.2023. //
import SwiftUI
struct LoginView: View { @StateObject var viewModel = LoginViewModel()
var body: some View { NavigationView { VStack { //Header HeaderView(title: "To Do List", subTitle: "Get things done", angle: 15, background: .pink) // Login Form Form { TextField("Email Address", text: $viewModel.email) .textFieldStyle(DefaultTextFieldStyle()) .autocapitalization(.none) SecureField("Password", text: $viewModel.password) .textFieldStyle(DefaultTextFieldStyle()) TLButton(title: "Log In", background: .blue) { print("aas") viewModel.login() } .padding() } .offset(y:-50) VStack { Text("New around here?") NavigationLink("Create An Account", destination: RegisterView()) } .padding(.bottom, 50) .snackbar(isShowing: $viewModel.showError, title: "Error", text: viewModel.errorMessage, style: .warning) } } }
}
Elements slide up due to padding. How can I fix.
// // LoginView.swift // ToDoList // // Created by Fatih Durmaz on 5.05.2023. //
import SwiftUI
struct LoginView: View { @StateObject var viewModel = LoginViewModel()
}
Elements slide up due to padding. How can I fix.