swiftswiftui

In alert text are coming as uppercase though no property is added in swiftUI?


I have an alert which is specified as below , and its showing alert is just a bool

.alert("Do you want to delete the event and its details?", isPresented: $showingAlert)

enter image description here But its coming always as bold


Solution

  • We were seeing a similar issue in our app. We had a standard .alert() configured on a view in a List which would occasionally (about 10-30% of the time) display in all caps for no apparent reason.

    Adding a .textCase(nil) call after the .alert() modifier seemed to resolve the issue for us.

    someView
        .alert(/* configure alert */)
        .textCase(nil)