buttonWithType should return UIButton

Originator:an00na
Number:rdar://20831137 Date Originated:05-May-2015 10:53 PM
Status:Open Resolved:
Product:iOS SDK Product Version:8.3
Classification:Enhancement Reproducible:Not Applicable
 
Summary:
UIButton.buttonWithType(:) should return UIButton instead of AnyObject. Currently, we have to use this kind of ugly code:
let button = UIButton.buttonWithType(.System) as! UIButton

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!