title: How do I scale down a navigationTitle in SwiftUI?
body: <p>I have the same problem as described in <a href="https://stackoverflow.com/questions/66899857/navigationtitle-too-long-in-swiftui">navigationtitle too long in swiftui</a> -- I want to scale down my navigation bar title to fit the available space. Here's the problem:</p>
  <p><a href="https://i.stack.imgur.com/DUHhV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DUHhV.png" alt="Navigation title too long" /></a></p>
  <p>Here's my code, which incorporates the suggestion made in the answer to the other referenced question:</p>
  <pre><code>struct AboutView: View {
      @Binding var showAboutView: Bool
      
      var body: some View {
          NavigationView {
              Form {
                  Section() {
                      Text(&quot;A placeholder for information about this app.\n\nDetails forthcoming....&quot;)
                  }
                  
                  if let url = URL(string: &quot;mailto:sarjo@sarjosoftware.com?subject=My+Wonderful+App&quot;) {
                      Section() {
                          Link(&quot;Contact the Author&quot;, destination: url)
                      }
                  }
              }
              // *** suggested solution ***
              .navigationTitle(Text(&quot;About My Wonderful App&quot;).minimumScaleFactor(0.5).lineLimit(1))
              .navigationBarItems(trailing: Button(action: {
                  showAboutView = false
              }) {
                  Text(&quot;Done&quot;).bold()
              })
          }
      }
  }
  </code></pre>
  <p>But this code fails to build with the error:
  <code>Instance method 'navigationTitle' requires that 'some View' conform to 'StringProtocol'</code> on the line <code>Form {</code>.
  If I move the modifiers on the title text outside to apply to the <code>navigationTitle</code> modifier itself, as shown here:</p>
  <pre><code>.navigationTitle(Text(&quot;About My Wonderful App&quot;)).minimumScaleFactor(0.5).lineLimit(1)
  </code></pre>
  <p>this code builds and runs, but the modifiers are not applied to the title text but to the body text beginning <code>&quot;A placeholder for </code>:</p>
  <p><a href="https://i.stack.imgur.com/EFIyO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EFIyO.png" alt="Scaling applied to body text" /></a></p>
  <p>Thanks for any suggestions.</p>