adding dimension ratio.

This commit is contained in:
Kevin G Christiano 2019-08-28 10:40:43 -04:00
parent c7501f9cd6
commit e0643d834e

View File

@ -466,6 +466,8 @@ public typealias ActionBlock = () -> ()
static func getTextAttachmentFrom(url: String, dimension: CGFloat, label: Label) -> NSTextAttachment {
let dimension = round(dimension * 0.8)
let imageAttachment = NSTextAttachment()
imageAttachment.bounds = CGRect(x: 0, y: 0, width: dimension, height: dimension)