UIButton border color support

Originator:bruno
Number:rdar://48962156 Date Originated:2019-03-17
Status:Open Resolved:
Product:iOS + SDK Product Version:n/a
Classification:Suggestion Reproducible:n/a
 
Area:
UIKit

UIButton would benefit greatly from proper support for different border colors per UIControl state.

A very common design for buttons is a button with text and a border around it. However, to do this properly, the border color should change or update itself according to the UIControl state of the button. For example, a button could have a blue border for its normal state and a grey border for its disabled state.

Currently, that's hard to do, causing developers to come up with hacks around UIButton that cause other conveniences or features for users to break. 

Proposed API:

```
open func UIButton.setBorderColor(_ color: UIColor, for controlState: UIControl.State)
open func UIButton.borderColor(for controlState: UIControl.State)
```

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!