Post

Replies

Boosts

Views

Activity

Reply to Value of type 'UIView?' has no member 'isEnabled'
What I should have done is the following. override func viewDidLoad() { super.viewDidLoad() cancellable = $segmentNumber.receive(on: DispatchQueue.main) .sink(receiveValue: { (number) in self.actionButton.isEnabled = (number == 0) ? false : true }) } Silly me...
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to Value of type 'UIView?' has no member 'isEnabled'
I guess it's a dumb question. segmentNumber is not a bool object.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21