The short answer is that you are not allowed to do this if you re releasing to the App Store; Apple provides the UI and since they don't provide a way to customize it you are supposed to leave it as is. The longer answer is that you can walk the view hierarchy and figure out which labels contain which text and then you can simply change the text on these UILabels. Its bad to do this for a lot of reasons:
1) It can get you rejected from the app store
2) The implementation can change between version, breaking your app
3) The text is localized so your changes will not work in other languages
With that warning, here is code to do a DFS search to find a view that matches a certain predicate, for instance, being a UILabel will some specific text.
import SwiftUI
import PlaygroundSupport
let a = UIView()
let b = UIView()
let c = UIView()
let l = UILabel()
let z = UILabel()
a.addSubview(b)
a.addSubview(c)
b.addSubview(z)
c.addSubview(l)
l.text = "hello"
extension UIView {
func child(matching predicate: (UIView) throws -> Bool) rethrows -> UIView? {
for child in subviews {
if try predicate(child) {
return child
}
if let found = try child.child(matching: predicate) {
return found
}
}
return nil
}
}
print(l === a.child(matching: {($0 as? UILabel)?.text == "hello"}))