UINavigationItem
具有以下私有变量
UIKIT_EXTERN_CLASS @interface UINavigationItem : NSObject <NSCoding> {
@private
NSString *_title;
NSString *_backButtonTitle;
UIBarButtonItem *_backBarButtonItem;
NSString *_prompt;
NSInteger _tag;
id _context;
UINavigationBar *_navigationBar;
UIView *_defaultTitleView;
UIView *_titleView;
UIView *_backButtonView;
UIBarButtonItem *_leftBarButtonItem;
UIBarButtonItem *_rightBarButtonItem;
UIView *_customLeftView;
UIView *_customRightView;
BOOL _hidesBackButton;
UIImageView *_frozenTitleView;
}
有什么方法(使用 KVC 等)来读取UINavigationBar *_navigationBar;
我需要这个来访问未定义的 backButton。这不在:
@property(nonatomic,retain) UIBarButtonItem *leftBarButtonItem;
@property(nonatomic,retain) UIBarButtonItem *backBarButtonItem;