Skip to content

Instantly share code, notes, and snippets.

@gmoraleda
Created November 15, 2018 13:04
Show Gist options
  • Save gmoraleda/3c971a72b3c028a19c3f336cddd626a2 to your computer and use it in GitHub Desktop.
Save gmoraleda/3c971a72b3c028a19c3f336cddd626a2 to your computer and use it in GitHub Desktop.
private func setupStrings(for speaker: Speaker) {
titleLabel.text = speaker.name
positionLabel.text = speaker.position
descriptionTextView.text = speaker.description
updateTextViewFrame()
}
private func updateTextViewFrame() {
contentView.layoutIfNeeded()
let rect = pictureImageView.convert(pictureImageView.bounds, to: descriptionTextView)
let imagePath = UIBezierPath(rect: rect)
descriptionTextView.textContainer.exclusionPaths = [imagePath]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment