Slide 12
Slide 12 text
extension Button {
func buttonOfPreferredSize() -‐> CGSize {
switch self {
case let .Rectangular(bounds, title, font):
return preferredSizeForRectangleButton(bounds,
title, font)
case let .RoundedCorners(bounds, title, font, radius):
return preferredSizeForRoundedRectangleButton(bounds,
title, font, radius)
}
}
}