Created
November 15, 2018 13:04
-
-
Save gmoraleda/3c971a72b3c028a19c3f336cddd626a2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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