Instead of extending Equatable, you can just have RawValue and compare it.
For example:
enum E: String {
case A, B, C(Int)
var rawValue: String {
if case .C(let something) = self { return "c_\(something)" }
return String(describing: self)
}
}
And than you can compare:
if A.rawValue != B.rawValue { ... }
Post
Replies
Boosts
Views
Activity
This solution worked for me:
toolbar.setItems([item], animated: false)
toolbar.updateConstraintsIfNeeded()