backgroundRect(forBounds:)
Returns the rectangle in which the receiver draws its background.
Declaration
func backgroundRect(forBounds bounds: CGRect) -> CGRectParameters
- bounds:
The bounding rectangle of the receiver.
Return Value
The bounds rectangle in which to draw any standard button content.
Discussion
The default implementation of this method returns the value in the bounds parameter. This rectangle represents the area in which the button draws its standard background content. Subclasses that provide custom background adornments can override this method and return a modified bounds rectangle to prevent the button from drawing over any custom content.