Since UIBarButtonItem
doesn't subclass UIView
, it's impossible to get at the normal characteristics like its frame
.
One way to do this is [barButtonItem valueForKey:@"view"]
This works perfectly, and allows you to add a GestureRecognizer (for instance) to the underlying UIView
.
However, is this a private UIKit
API violation?