Present view as sheet and fullscreen(SwiftUI)

@State var show = false
Button(action: {print(“Forgot tapped!”)self.show = true}) {Text(“Forgot Password?”).foregroundColor(Color(UIColor.PrimaryColor.MainColor)).fullScreenCover(isPresented: $show, content: {Home()})}
Fig1: full screen
Button(action: {print(“Forgot tapped!”)self.show = true}) {Text(“Forgot Password?”).foregroundColor(Color(UIColor.PrimaryColor.MainColor)).sheet(isPresented: $show, content: {Home()})}
Fig2: sheet

--

--

--

I developed and maintain applications aimed at a range of iOS devices including mobile phones and tablet computers.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

SwiftUI — List and NavigationView

A comprehensive view of iOS 11

Deploy Flutter Web App to Azure App Service with Node.js

iOS: Creating and designing a data model with Core Data

can’t get enough of imac screen removing. one with a psu other a random restart problem.

can’t get enough of imac screen removing. one with a psu other a random restart problem.

Opening iOS app on M1

How To: Deploy iOS app into App Store from handover Project

Underline segment control programmatically (Swift)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nitish Kumar

Nitish Kumar

I developed and maintain applications aimed at a range of iOS devices including mobile phones and tablet computers.

More from Medium

UIViewController Lifecycle

Presenting a SwiftUI view in a UIKit view controller

Decorator Pattern in Swift

Underline segment control programmatically (Swift)