• Home
  • AI
  • DSA
  • iOS
  • Flutter
  • Android
    • Jetpack
    • Android Tutorials
    • Android development
    • Android Kotlin
  • 5G
  • 4G LTE
    • IoT
  • E-learning
  • Blog
  • Streaming
Saturday, October 4, 2025
  • Home
  • AI
  • DSA
  • iOS
  • Flutter
  • Android
    • Jetpack
    • Android Tutorials
    • Android development
    • Android Kotlin
  • 5G
  • 4G LTE
    • IoT
  • E-learning
  • Blog
  • Streaming
subscribe
subscribe to my newsletter!

"Get all latest content delivered straight to your inbox."

[mc4wp_form id="36"]
Codeplayon
Codeplayon
  • Home
  • AI
  • DSA
  • iOS
  • Flutter
  • Android
    • Jetpack
    • Android Tutorials
    • Android development
    • Android Kotlin
  • 5G
  • 4G LTE
    • IoT
  • E-learning
  • Blog
  • Streaming
HomeiOSCreate a Login Page in SwiftUI – using swiftui button & textfield, Image
Jan. 11, 2024 at 4:15 pm
iOS

Create a Login Page in SwiftUI – using swiftui button & textfield, Image

2 years agoFebruary 7, 2024
Login Page Design in SwiftUI
1.2kviews

Hi developer in this iOS swiftUi tutorial i am share how to design a login page in swiftUi. using SwiftUI Button, Textfield & image. like gmail login page, facebook login page etc. With make customized button ui and image.

What is Login page in SwiftUi .

Table of Contents

Toggle
  • What is Login page in SwiftUi .
  • mychart login page swiftUi Example.
  • mychart login page Full Source code Example.

A login page specifies the login URL in a web application that users must pass through to get to the authenticated URLs at the heart of the application. Authenticated URLs are URLs that become accessible to users only after they successfully log in to the login URL.

A login page is a door that users must open in order to get the best out of their user experience with a website. It is the starting point of navigating a website in a personalized manner.

so let’s start to create a login page Ui you just follow below code.

mychart login page swiftUi Example.

let’s create a new ios project selecting with swifitUi and follow the below code. in the body view firstly use the Vstack and then use a Text after the showing a image.

 

SwiftiUI Text For App Tital

   Text("Login")

                .font(.largeTitle).foregroundColor(Color.white)
                .padding([.top, .bottom], 40)
                .shadow(radius: 10.0, x: 20, y: 10)

 

Swifit UI Image with Circle  for Logo

Image(systemName: "apple.logo")

                .resizable()

                .frame(width: 80, height: 80)

                .padding(.all, 20)

                .overlay(Circle().stroke(Color.white, lineWidth: 2))

                .shadow(radius: 10.0, x: 20, y: 10)

                .padding(.bottom,40)

 

TextField SwiftUI for Enter Email ID

TextField("Email", text: self.$email)

                    .padding()

                    .background(Color.themeTextField)

                    .cornerRadius(20.0)

                    .shadow(radius: 10.0, x: 20, y: 10)

 

SwiftUI  SecureField for Password

SecureField("Password", text: self.$password)

                    .padding()

                    .background(Color.themeTextField)

                    .cornerRadius(20.0)

                    .shadow(radius: 10.0, x: 20, y: 10)

            }.padding([.leading, .trailing], 27.5)

            

SwiftUI Button for Login Button

Button(action: {


            }) {

                Text("Sign In")

                    .font(.headline)

                    .foregroundColor(.white)

                    .padding()

                    .frame(width: 300, height: 50)

                    .background(Color.green)

                    .cornerRadius(15.0)

                    .shadow(radius: 10.0, x: 20, y: 10)

            }.padding(.top, 50)

 

 

also i am using VStack and HStack for mange the UI field vertical and horizontally. you can find complete code below.

 

mychart login page Full Source code Example.

import Foundation

import SwiftUI

struct LoginView: View {

    // MARK: - Propertiers

    @State private var email = ""

    @State private var password = ""

    

    // MARK: - View

    var body: some View {

        VStack() {

            Text("Login")

                .font(.largeTitle).foregroundColor(Color.white)

                .padding([.top, .bottom], 40)

                .shadow(radius: 10.0, x: 20, y: 10)

            

            Image(systemName: "apple.logo")

                .resizable()

                .frame(width: 80, height: 80)

                .padding(.all, 20)

                .overlay(Circle().stroke(Color.white, lineWidth: 2))

                .shadow(radius: 10.0, x: 20, y: 10)

                .padding(.bottom,40)

                

            

            VStack(alignment: .leading, spacing: 15) {

                TextField("Email", text: self.$email)

                    .padding()

                    .background(Color.themeTextField)

                    .cornerRadius(20.0)

                    .shadow(radius: 10.0, x: 20, y: 10)

                

                SecureField("Password", text: self.$password)

                    .padding()

                    .background(Color.themeTextField)

                    .cornerRadius(20.0)

                    .shadow(radius: 10.0, x: 20, y: 10)

            }.padding([.leading, .trailing], 27.5)

            

            Button(action: {

                

            }) {

                Text("Sign In")

                    .font(.headline)

                    .foregroundColor(.white)

                    .padding()

                    .frame(width: 300, height: 50)

                    .background(Color.green)

                    .cornerRadius(15.0)

                    .shadow(radius: 10.0, x: 20, y: 10)

            }.padding(.top, 50)

            

            Spacer()

            HStack(spacing: 0) {

                Text("Don't have an account? ")

                Button(action: {}) {

                    Text("Sign Up")

                        .foregroundColor(.white)

                }

            }

        }

        .background(

            LinearGradient(gradient: Gradient(colors: [.red, .blue]), startPoint: .top, endPoint: .bottom)

                .edgesIgnoringSafeArea(.all))

        

    }

}

extension Color {

    static var themeTextField: Color {

        return Color(red: 220.0/255.0, green: 230.0/255.0, blue: 230.0/255.0, opacity: 1.0)

    }

}

struct LoginView_Previews: PreviewProvider {

    static var previews: some View {

        LoginView()

    }

}

read more android, iOS , Flutter tutorial and example on codeplayon. happy coding if it helpful for your learn share and explore more.

Read More Tutorial 

  • Codeplayon Jetpack Compose Tutorial 
  • Codeplayon Android Tutorial 
  • Codeplayon Flutter Tutorial 
  • Codeplayon on Github
Tags :Login PageLogin Page DesignSwiftUI Login Page
share on Facebookshare on Twitter
Shivam MalikJanuary 11, 2024

Shivam Malik

Welcome to my blog! I’m Ritu Malik, and here at Codeplayon.com, we are dedicated to delivering timely and well-researched content. Our passion for knowledge shines through in the diverse range of topics we cover. Over the years, we have explored various niches such as business, finance, technology, marketing, lifestyle, website reviews and many others. Pinay Viral sfm compile AsianPinay taper fade haircut Pinay flex Pinay hub pinay Viral Fsi blog com pinay yum pinayyum.com
view all posts
filmymeet5 : Facts About You Should Know 2025
Create a Weather iOS APP UI with Sunrise And Sunset View in SwiftUI

You Might Also Like

iOS 18.2 new features
iOS

iOS 18.2 new features you can test for yourself on Your iPhone first

Shivam Malik
How do you make a line chart and bar chart graph in SwiftUI
iOS

How do you make a line chart and bar chart graph in SwiftUI?

Shivam Malik
How to used swiftui button and TextField
iOS

How to used swiftui button & TextField – iOS

Shivam Malik
Build a Compass app with SwiftUI
iOS

Build a Compass app with SwiftUI

Shivam Malik
How to build Bubble level app swiftui
iOS

How to build Bubble level app swiftui

Shivam Malik
How to create a Image Slider in SwiftUI
iOS

How to create a Image Slider in SwiftUI ?

Shivam Malik

Get Even More

"Get all latest content delivered straight to your inbox."
[mc4wp_form id="36"]

latest posts

picuki codeplayon.com
Blog

Picuki – Best Instagram Viewer & Instagram Downloader 2025

Shivam Malik
3k
What Is Redeepseek Com
technology

Redeepseek Com: The Future of Smarter Tech Insights

Shivam Malik
808
What is single sign-on (SSO)
AI

What is SSO Single Sign-On? | How It Works & Benefits

Shivam Malik
963
Android 16’s New Orientation Rules (2)
Android Kotlin

Android 16’s New Orientation Rules | The End of Portrait-Only Apps: Adapting

Shivam Malik
998

find me on socials

Search

Contact Info

Contact information that feels like a warm, friendly smile.

Email:Info.codeplayon@gmail.com
Website:Codeplayon

popular posts

Joinpd.con code

How to get Pear Deck Join Code For JoinPD.con 2025?

2 months agoAugust 15, 2025
rice purity test

What is Rice Purity Test Score Meaning: Check Score [2025]

9 months agoAugust 28, 2025
Disneyplus.com/begin

How to Activate Disneyplus.com begin account 2025

3 months agoAugust 4, 2025
Sitemap.Html
  • Picuki – Best Instagram Viewer & Instagram Downloader 2025
  • Redeepseek Com: The Future of Smarter Tech Insights
  • What is SSO Single Sign-On? | How It Works & Benefits
  • Android 16’s New Orientation Rules | The End of Portrait-Only Apps: Adapting
  • CPSB LaunchPad: Enhancing Educational Access and Engagement
Codeplayon
  • Privacy Policy

Copyright © 2024 Codeplayon | NewsMozi Asian Pinay.com Taper Fade Haircut sfm compile club Asian Pinay pinayhub.com pinayflex.com pinay Viral Fsi blog com