Posts

Post marked as solved
11 Replies
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 marked as solved
11 Replies
This solution worked for me: toolbar.setItems([item], animated: false) toolbar.updateConstraintsIfNeeded()