#import <CoreGraphics/CoreGraphics.h>
#import <Foundation/Foundation.h>
#import <UIKit/UIBarItem.h>
#import <UIKit/UIKitDefines.h>
#import <UIKit/UIAppearance.h>
#import <UIKit/UIApplication.h>
#import <UIKit/UIBarCommon.h>
typedef NS_ENUM(NSInteger,UIBarButtonItemStyle) {
UIBarButtonItemStylePlain,
UIBarButtonItemStyleBordered NS_ENUM_DEPRECATED_IOS(2_0,8_0, "UseUIBarButtonItemStylePlain when minimum deployment target is iOS7 or later"),
UIBarButtonItemStyleDone,
};
typedef NS_ENUM(NSInteger,UIBarButtonSystemItem) {
UIBarButtonSystemItemDone,
UIBarButtonSystemItemCancel,
UIBarButtonSystemItemEdit,
UIBarButtonSystemItemSave,
UIBarButtonSystemItemAdd,
UIBarButtonSystemItemFlexibleSpace,
UIBarButtonSystemItemFixedSpace,
UIBarButtonSystemItemCompose,
UIBarButtonSystemItemReply,
UIBarButtonSystemItemAction,
UIBarButtonSystemItemOrganize,
UIBarButtonSystemItemBookmarks,
UIBarButtonSystemItemSearch,
UIBarButtonSystemItemRefresh,
UIBarButtonSystemItemStop,
UIBarButtonSystemItemCamera,
UIBarButtonSystemItemTrash,
UIBarButtonSystemItemPlay,
UIBarButtonSystemItemPause,
UIBarButtonSystemItemRewind,
UIBarButtonSystemItemFastForward,
#if __IPHONE_3_0 <= __IPHONE_OS_VERSION_MAX_ALLOWED
UIBarButtonSystemItemUndo,
UIBarButtonSystemItemRedo,
#endif
#if __IPHONE_4_0 <= __IPHONE_OS_VERSION_MAX_ALLOWED
UIBarButtonSystemItemPageCurl,
#endif
};
@class UIImage, UIView;
NS_CLASS_AVAILABLE_IOS(2_0)@interface UIBarButtonItem: UIBarItem <NSCoding> {
@private
NSString *_title;
NSSet *_possibleTitles;
SEL _action;
id _target;
UIImage *_image;
UIImage *_landscapeImagePhone;
UIEdgeInsets _imageInsets;
UIEdgeInsets _landscapeImagePhoneInsets;
CGFloat _width;
UIView *_view;
NSInteger _tag;
id _appearanceStorage;
struct {
unsigned int enabled:1;
unsigned int style:3;
unsigned int isSystemItem:1;
unsigned int systemItem:7;
unsigned int viewIsCustom:1;
unsigned int isMinibarView:1;
unsigned intdisableAutosizing:1;
unsigned int selected:1;
unsigned int imageHasEffects:1;
}_barButtonItemFlags;
}
- (instancetype)initWithImage:(UIImage *)image style:(UIBarButtonItemStyle)style target:(id)target action:(SEL)action;
- (instancetype)initWithImage:(UIImage *)image landscapeImagePhone:(UIImage *)landscapeImagePhone style:(UIBarButtonItemStyle)style target:(id)target action:(SEL)actionNS_AVAILABLE_IOS(5_0);
- (instancetype)initWithTitle:(NSString *)title style:(UIBarButtonItemStyle)style target:(id)target action:(SEL)action;
- (instancetype)initWithBarButtonSystemItem:(UIBarButtonSystemItem)systemItemtarget:(id)targetaction:(SEL)action;
- (instancetype)initWithCustomView:(UIView *)customView;
@property(nonatomic) UIBarButtonItemStyle style; // default is UIBarButtonItemStylePlain
@property(nonatomic) CGFloat width; // default is 0.0
@property(nonatomic,copy) NSSet *possibleTitles; // default is nil
@property(nonatomic,retain) UIView *customView; // default is nil
@property(nonatomic) SEL action; // default is NULL
@property(nonatomic,assign) id target; // default is nil
- (void)setBackgroundImage:(UIImage *)backgroundImage forState:(UIControlState)statebarMetrics:(UIBarMetrics)barMetricsNS_AVAILABLE_IOS(5_0)UI_APPEARANCE_SELECTOR;
- (UIImage *)backgroundImageForState:(UIControlState)state barMetrics:(UIBarMetrics)barMetricsNS_AVAILABLE_IOS(5_0)UI_APPEARANCE_SELECTOR;
- (void)setBackgroundImage:(UIImage *)backgroundImage forState:(UIControlState)statestyle:(UIBarButtonItemStyle)style barMetrics:(UIBarMetrics)barMetricsNS_AVAILABLE_IOS(6_0) UI_APPEARANCE_SELECTOR;
- (UIImage *)backgroundImageForState:(UIControlState)state style:(UIBarButtonItemStyle)style barMetrics:(UIBarMetrics)barMetricsNS_AVAILABLE_IOS(6_0)UI_APPEARANCE_SELECTOR;
@property(nonatomic,retain)UIColor *tintColor NS_AVAILABLE_IOS(5_0);
- (void)setBackgroundVerticalPositionAdjustment:(CGFloat)adjustmentforBarMetrics:(UIBarMetrics)barMetricsNS_AVAILABLE_IOS(5_0)UI_APPEARANCE_SELECTOR;
- (CGFloat)backgroundVerticalPositionAdjustmentForBarMetrics:(UIBarMetrics)barMetricsNS_AVAILABLE_IOS(5_0)UI_APPEARANCE_SELECTOR;
- (void)setTitlePositionAdjustment:(UIOffset)adjustment forBarMetrics:(UIBarMetrics)barMetricsNS_AVAILABLE_IOS(5_0)UI_APPEARANCE_SELECTOR;
- (UIOffset)titlePositionAdjustmentForBarMetrics:(UIBarMetrics)barMetricsNS_AVAILABLE_IOS(5_0)UI_APPEARANCE_SELECTOR;
- (void)setBackButtonBackgroundImage:(UIImage *)backgroundImage forState:(UIControlState)statebarMetrics:(UIBarMetrics)barMetricsNS_AVAILABLE_IOS(5_0)UI_APPEARANCE_SELECTOR;
- (UIImage *)backButtonBackgroundImageForState:(UIControlState)statebarMetrics:(UIBarMetrics)barMetricsNS_AVAILABLE_IOS(5_0)UI_APPEARANCE_SELECTOR;
- (void)setBackButtonTitlePositionAdjustment:(UIOffset)adjustmentforBarMetrics:(UIBarMetrics)barMetricsNS_AVAILABLE_IOS(5_0)UI_APPEARANCE_SELECTOR;
- (UIOffset)backButtonTitlePositionAdjustmentForBarMetrics:(UIBarMetrics)barMetricsNS_AVAILABLE_IOS(5_0)UI_APPEARANCE_SELECTOR;
- (void)setBackButtonBackgroundVerticalPositionAdjustment:(CGFloat)adjustmentforBarMetrics:(UIBarMetrics)barMetricsNS_AVAILABLE_IOS(5_0)UI_APPEARANCE_SELECTOR;
- (CGFloat)backButtonBackgroundVerticalPositionAdjustmentForBarMetrics:(UIBarMetrics)barMetricsNS_AVAILABLE_IOS(5_0)UI_APPEARANCE_SELECTOR;
@end