How to add a subtitle below a large title in a navigation view in swift ui?
I have found a solution to what I was looking for: basically create the top of the screen as it would normally be without a navigationView and then add a scrollview underneath.
HStack {
VStack(alignment: .leading, spacing: 5) {
Text("Title")
.font(.largeTitle)
.foregroundColor(Color(UIColor.label))
.fontWeight(.bold)
Text("subtitle")
.font(.subheadline)
.foregroundColor(Color(UIColor.label))
}
Spacer()
}
.padding()
ScrollView(.vertical, showsIndicators: false) {}
SwiftUI: How to align a NavigationBarItem with a large title navigation title?
You can't. Because the Navigation Title is dynamic as it can change from small to big on scroll, at least you say otherwise, the UI does not allow you to set up the navigation items aligned vertically in other position other than the expected. That is right below the safe area. Is like giving a leading navigation item hides the back button. This is how Cocoa Touch either via SwiftUI or UIKIt works.
Related Topics
React Native Sending Events to JavaScript in Swift
Kvo with Shared Nsuserdefaults in Swift
Mkmapview Not Clustering Annotation on Zooming Out Map in Swift
How to Reset Hididletime on MACos 10.14
Apple MACh-O Linker Error, After Changing Project Name
Ios-Charts Library: X-Axis Labels Without Backing Data Not Showing
Single and Double Taps on Uitableviewcell in Swift 3
How to Check If Annotation Is Clustered (Mkmarkerannotationview and Cluster)
Cancelling an Alamofire Request Wrapped in Nsoperation Causes Multiple Kvo
Terminate Subprocesses of MACos Command Line Tool in Swift
Centering the Camera on a Node in Swift Spritekit
Cut a Circle Out of a Uiview Using Mask
Convert Screen Coordinates to Metal's Normalized Device Coordinates
Passing Data Between Two Nsoperations
Difference Between String Interpolation and String Concatenation
How to Position Banner Ads Over Uitabbar
Swift - Converting from Unsafepointer<Uint8> with Length to String