I'm trying to get the width of a UIBarButtonItem.
UIBarButtonItem
This doesn't work:
barbuttonitem.customView.frame.size.width
And this won't work, either:
barbuttonitem.width
What about this:
UIBarButtonItem *item = /*...*/; UIView *view = [item valueForKey:@"view"]; CGFloat width = view? [view frame].size.width : (CGFloat)0.0;
2.1m questions
2.1m answers
60 comments
57.0k users