Skip to content

Instantly share code, notes, and snippets.

@max6363
Created January 20, 2022 12:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save max6363/67287aee29fb97345d0be4ce36f6e012 to your computer and use it in GitHub Desktop.
Save max6363/67287aee29fb97345d0be4ce36f6e012 to your computer and use it in GitHub Desktop.
let theEventTitleLabel = UILabel()
/*
let newEventLabelSubscriber = Subscribers.Assign(object: theEventTitleLabel, keyPath: \.text)
eventPublisher.subscribe(newEventLabelSubscriber)
*/
eventPublisher.assign(to: \.text, on: theEventTitleLabel) // <-- [new code line]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment