What about this:
UIBarButtonItem *item = /*...*/;
UIView *view = [item valueForKey:@"view"];
CGFloat width = view? [view frame].size.width : (CGFloat)0.0;
More Related Contents:
- Change position of UIBarButtonItem in UINavigationBar
- QLPreviewController remove or add UIBarButtonItems
- How to tint UIBarButtonItem background color? [duplicate]
- Difference between self.ivar and ivar?
- Understanding reference counting with Cocoa and Objective-C
- Detect the specific iPhone/iPod touch model [duplicate]
- Objective-c iPhone percent encode a string?
- JSON and Core Data on the iPhone
- How do I add a gradient to the text of a UILabel, but not the background?
- Open Source Cocoa/Cocoa-Touch POP3/SMTP library?
- MKAnnotationView – Lock custom annotation view to pin on location updates
- How do I use CaptiveNetwork to get the current WiFi Hotspot Name
- Just two rounded corners? [duplicate]
- Keeping object on top of keyboard in the event of becomeFirstResponder or resignFirstResponder?
- iOS: Access app-info.plist variables in code
- Dragging an UIView inside UIScrollView
- iOS Pinch Scale and Two Finger Rotate at same time
- Core-Data iPhone: could not locate an NSManagedObjectModel
- Finding Path/Route Between two points on MapKit in iPhone
- NSLocale currentLocale always returns “en_US” not user’s current language
- Moving status bar in iOS 7
- Removing time components from an NSDate object using Objective C/Cocoa
- UTF8 character decoding in Objective C
- Compress/Decompress NSString in objective-c (iphone) using GZIP or deflate
- Push ViewController from Right To Left with UINavigationController
- How to use iOS Reachability
- UIApplication sharedApplication – keyWindow is nil?
- Reading PDF files as string through iPhone application
- Obtain Apple software id number before appstore submission (for Appirater)
- Register UncaughtExceptionHandler in Objective C using NSSetUncaughtExceptionHandler