Repo created
This commit is contained in:
parent
4af19165ec
commit
68073add76
12458 changed files with 12350765 additions and 2 deletions
14
iphone/Maps/Classes/InsetsLabel.swift
Normal file
14
iphone/Maps/Classes/InsetsLabel.swift
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import Foundation
|
||||
|
||||
class InsetsLabel: UILabel {
|
||||
var insets = UIEdgeInsets.zero
|
||||
|
||||
override func drawText(in rect: CGRect) {
|
||||
super.drawText(in: rect.inset(by: insets));
|
||||
}
|
||||
|
||||
override var intrinsicContentSize: CGSize {
|
||||
return CGSize(width: super.intrinsicContentSize.width + insets.left + insets.right,
|
||||
height: super.intrinsicContentSize.height + insets.top + insets.bottom)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue