adding dimension ratio.
This commit is contained in:
parent
c7501f9cd6
commit
e0643d834e
@ -466,6 +466,8 @@ public typealias ActionBlock = () -> ()
|
|||||||
|
|
||||||
static func getTextAttachmentFrom(url: String, dimension: CGFloat, label: Label) -> NSTextAttachment {
|
static func getTextAttachmentFrom(url: String, dimension: CGFloat, label: Label) -> NSTextAttachment {
|
||||||
|
|
||||||
|
let dimension = round(dimension * 0.8)
|
||||||
|
|
||||||
let imageAttachment = NSTextAttachment()
|
let imageAttachment = NSTextAttachment()
|
||||||
imageAttachment.bounds = CGRect(x: 0, y: 0, width: dimension, height: dimension)
|
imageAttachment.bounds = CGRect(x: 0, y: 0, width: dimension, height: dimension)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user