How is the new way to test button.title(for: .normal) == nil and since IOS 15

Hi, :blush:
I'm learning swift and I have issues with with functions containing the : button.title(for: .normal) == nil
so apparently since IOS 15 the code of the button is different
but I haven't being able to found the code snip to test ```
button.title(for: .normal) == nil
I'm also looking for the new way of writing button.setTitle(nil, for: .normal)
Anybody has a clue ?

This question is about SwiftUI, not Swift. SwiftUI is a closed-source framework for Apple machines, and is not appropriate for this forum on the open-source Swift environment. SwiftUI is not part of Swift, however it is written in Swift by Apple engineers and developers.

If you look at the SwiftUI documentation at, you should be able to answer your question pretty quickly.

Hi, the documentation is not clear at all for newbies but thanks anyway.

1 Like

It's not immediately obvious what problem you are encountering.
The documentation still has the title parameter / return value typed as optional string.