I have a button in a toolbar. How can I grab its frame? Do UIBarButtonItems not have a frame property?
UIBarButtonItem
frame
Try this one;
UIBarButtonItem *item = ... ; UIView *view = [item valueForKey:@"view"]; CGFloat width; if(view){ width=[view frame].size.width; } else{ width=(CGFloat)0.0 ; }
2.1m questions
2.1m answers
60 comments
57.0k users