overridefunctextRect(forBounds bounds:CGRect, limitedToNumberOfLines numberOfLines:Int) ->CGRect{
varrect =super.textRect(forBounds:UIEdgeInsetsInsetRect(bounds,edges) , limitedToNumberOfLines: numberOfLines)
rect.origin.x-=edges.left;
rect.origin.y-=edges.top;
rect.size.width+=edges.left+edges.right;
rect.size.height+=edges.top+edges.bottom;
returnrect
}
overridefuncdrawText(in rect:CGRect) {
super.drawText(in:UIEdgeInsetsInsetRect(rect,edges))
}