SwiftUI combine rectangle and triangle in shape Making custom shape is not hard in SwiftUI by implementing func path(in rect: CGRect) -> Path. You just have to draw points in your desired location in 2D coordinate space by path.move() and path.addLine() func, a line will be drawn automatically. Spread the love
Category Archives: swiftui
Navigation in SwiftUI with multiple views
Navigation in SwiftUI video Download Complete Login app with Laravel API I was trying to build a simple app in iOS + SwiftUI with multiple views that uses NavigationView and NavigationLink. This app is very simple and uses a model to navigate between destinations. Enum ViewType tracks all the destinations. If you want to have …
Continue reading “Navigation in SwiftUI with multiple views”
SwiftUI Know When Entering Landscape Mode
Create a ObservableObject Object like this Now go to your SceneDelegate and add a var on top and pass your settings var in UIHostingController in willConnectTo method. and in didUpdate delegate method, add this code. Now you can use this @EnvironmentObject in any View Spread the love