Add padding to a general View programmatically with swift

Is there a "general syntax" for add a padding on any UIView created programmatically in Swift?

For example I've created a UITextField() and a UILabel(), is there a common method to add to them a padding?