Is it only classes inheriting from UIControl
that can become "first responder"?
I need a button in the navigation bar that brings up a UIPickerView
using the inputView/inputAccessoryView
properties. I know that I can use the customView
property of the UIBarButtonItem
and create a custom UIButton
, but this would need "Photo Shopping" to create an image similar to the UIBarButtonItem
"Done" style but开发者_开发技巧ton (which is what I want).
Any suggestions how/if I can get UIBarButtonItem
to become first responder?
Basically any class which inherits from UIResponder (not just UIControl, but also UIView subclasses) can become first responders, but UIBarButtonItem inherits from UIBarItem and NSObject. Hence it can not become the first responder.
Out of curiosity, what you are doing is not possible by just displaying the UIPickerView on a button press?
精彩评论