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 ; }
1.4m articles
1.4m replys
5 comments
57.0k users