In iOS 26, I found that editButtonItem.title cannot be programmatically updated as before.
Even when explicitly setting the title in viewWillAppear or inside setEditing(_:animated:), the text remains the default “Edit” / “☑️”.
Here is a minimal reproducible example:
import UIKit
class ViewController: UIViewController {
private let infoLabel: UILabel = {
let l = UILabel()
l.text = "uneditable"
l.font = .systemFont(ofSize: 28, weight: .medium)
l.textAlignment = .center
l.translatesAutoresizingMaskIntoConstraints = false
return l
}()
private let textField: UITextField = {
let tf = UITextField()
tf.placeholder = "This will become effective when you edit it."
tf.borderStyle = .roundedRect
tf.translatesAutoresizingMaskIntoConstraints = false
tf.isEnabled = false
return tf
}()
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .systemBackground
navigationItem.title = "sample"
navigationItem.rightBarButtonItem = editButtonItem
setupLayout()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
updateEditButtonTitle()
}
private func setupLayout() {
view.addSubview(infoLabel)
view.addSubview(textField)
NSLayoutConstraint.activate([
infoLabel.centerXAnchor.constraint(equalTo: view.centerXAnchor),
infoLabel.centerYAnchor.constraint(equalTo: view.centerYAnchor, constant: -40),
textField.topAnchor.constraint(equalTo: infoLabel.bottomAnchor, constant: 20),
textField.leadingAnchor.constraint(equalTo: view.layoutMarginsGuide.leadingAnchor),
textField.trailingAnchor.constraint(equalTo: view.layoutMarginsGuide.trailingAnchor),
textField.heightAnchor.constraint(equalToConstant: 44),
])
}
override func setEditing(_ editing: Bool, animated: Bool) {
super.setEditing(editing, animated: animated)
textField.isEnabled = editing
infoLabel.text = editing ? "editable" : "uneditable"
if editing {
textField.becomeFirstResponder()
} else {
textField.resignFirstResponder()
}
updateEditButtonTitle()
}
private func updateEditButtonTitle() {
editButtonItem.title = isEditing ? "done" : "edit"
}
}
Expected behavior
Changing editButtonItem.title should update the displayed title of the bar button item.
Actual behavior (iOS 26)
The title remains the default “Edit” / “☑️” text, ignoring programmatic updates.
This worked in previous iOS versions. It appears that in iOS 26 the system may be overriding editButtonItem.title automatically, preventing custom titles.
Is this an intentional change, or a bug introduced in iOS 26?
Topic:
UI Frameworks
SubTopic:
UIKit