Thanks to visit codestin.com
Credit goes to github.com

Skip to content

AndresMzaDev/IOsTest-Login

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

background-Green.png

Login for iOS

This is a super simple Login, where there is a home screen, where you can register and log in, you can create your user, this form has validations, as well as log in, where you can see your data

Tech Stack

Client: swift, swiftui

Authors

FAQ

Will Users be saved in the database?

These are not stored in a class but a user type structure

What type of architecture is it made with?

It was about implementing the MVVM architecture, for the management of screens and logic.

Documentation

Documentation

Usage/Examples

A data store was simulated, where there is user validation and adding a new user.

class UserStore: ObservableObject {
    @Published var users: [userStruct] = [userStruct(name: "Andres Neptaly Meza", age: 30, numberPhone: 99999999999, gender: "M", email: "[email protected]", password: "Admin123.")]
    
    func addUser(name: String, age: Int, numberPhone: Int, gender: String, email: String, password: String ){
        let newUser =  userStruct(name: name, age: age, numberPhone: numberPhone, gender: gender, email: email, password: password)
        users.append(newUser)

        print("usuarios \(getUser())")
    }
    
    func validateEmail(_ email: String) -> Bool {
        
        if let userFound = users.first(where: { $0.email == email }) {
            print("Persona encontrada: \(userFound)")
            return true
        } else {
            print("No se encontró ninguna persona con edad igual a 30")
            return false
          
        }
    }
    
    func getUser() -> [userStruct] {
        return users
    }
}

My name is Andres Meza, developer and designer, you can see more of my work at: 👋

portfolio figma github linkedin dribbble portfolio figma github linkedin dribbble portfolio figma github linkedin dribbble portfolio

About

Login of a small app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages