1

In iOS 13 we're seeing this bug when using the UISearchBar (via. the UISearchController. Next to the dismiss button (x) there is a small black fragment.

The issue was not present in iOS 12.4.

Using the UI debugger I've identified the issue is caused by us localising the "Cancel" string ourselves (because we want to translate the app in more languages than supported by the Apple System UI), using the following code:

UIButton.appearance(whenContainedInInstancesOf: [UISearchBar.self])
        .setTitle("Cancel", for: .normal)

UISearchBar view in iOS 13

Claus Jørgensen
  • 25,882
  • 9
  • 87
  • 150

1 Answers1

1

Per comments, https://stackoverflow.com/a/58040862/95309 have a fix:

UIBarButtonItem.appearance(whenContainedInInstancesOf: [UISearchBar.self]).title

The difference between the UIButton.appearance and UIBarButtonItem.appearance seems to been the culprit.

Claus Jørgensen
  • 25,882
  • 9
  • 87
  • 150