iOS 9.2: UISearchBar should make .inputView a writable property

Originator:igeek1
Number:rdar://24466350 Date Originated:02-Feb-2016 04:06 PM
Status:Open Resolved:
Product:iOS SDK Product Version:9.2 (13C75)
Classification:Enhancement Reproducible:Always
 
Summary:
I’m making a search field that should allow only numeric input, and I want to use a custom keyboard like MMNumberKeyboard, but UISearchBar’s .inputView is readonly.

Steps to Reproduce:
1. Try to set .inputView on a UISearchBar.

Expected Results:
Compiles without error. Shows a custom input view when the search bar becomes the first responder.

Actual Results:
Compilation error because UISearchBar’s inputView property is readonly.

Regression:
As far as I know, this has never worked.

Notes:
It’s possible if you traverse subviews and set the inputView on search bar’s private label, but obviously that’s pretty fragile. It would be nice if this were supported.

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!