mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-01-31 22:43:19 +08:00
This change fixes the problem when header would update to the previous screen configuration as a result of starting swipe back gesture but never restore to the original one in case swipe back gets cancelled (e.g. user didn't swipe far enough). The problem was that as a result of swipe back we'd apply header config changes but after cancel there was no trigger to reset header to the previous state.
48 lines
1.5 KiB
Objective-C
48 lines
1.5 KiB
Objective-C
#import <React/RCTViewManager.h>
|
|
#import <React/RCTConvert.h>
|
|
|
|
@interface RNSScreenStackHeaderConfig : UIView
|
|
|
|
@property (nonatomic, retain) NSString *title;
|
|
@property (nonatomic, retain) NSString *titleFontFamily;
|
|
@property (nonatomic, retain) NSNumber *titleFontSize;
|
|
@property (nonatomic, retain) UIColor *titleColor;
|
|
@property (nonatomic, retain) NSString *backTitle;
|
|
@property (nonatomic, retain) NSString *backTitleFontFamily;
|
|
@property (nonatomic, retain) NSNumber *backTitleFontSize;
|
|
@property (nonatomic, retain) UIColor *backgroundColor;
|
|
@property (nonatomic, retain) UIColor *color;
|
|
@property (nonatomic) BOOL hide;
|
|
@property (nonatomic) BOOL largeTitle;
|
|
@property (nonatomic) BOOL hideBackButton;
|
|
@property (nonatomic) BOOL hideShadow;
|
|
@property (nonatomic) BOOL translucent;
|
|
@property (nonatomic) BOOL gestureEnabled;
|
|
|
|
+ (void)willShowViewController:(UIViewController *)vc withConfig:(RNSScreenStackHeaderConfig*)config;
|
|
|
|
@end
|
|
|
|
@interface RNSScreenStackHeaderConfigManager : RCTViewManager
|
|
|
|
@end
|
|
|
|
typedef NS_ENUM(NSInteger, RNSScreenStackHeaderSubviewType) {
|
|
RNSScreenStackHeaderSubviewTypeLeft,
|
|
RNSScreenStackHeaderSubviewTypeRight,
|
|
RNSScreenStackHeaderSubviewTypeTitle,
|
|
RNSScreenStackHeaderSubviewTypeCenter,
|
|
};
|
|
|
|
@interface RCTConvert (RNSScreenStackHeader)
|
|
|
|
+ (RNSScreenStackHeaderSubviewType)RNSScreenStackHeaderSubviewType:(id)json;
|
|
|
|
@end
|
|
|
|
@interface RNSScreenStackHeaderSubviewManager : RCTViewManager
|
|
|
|
@property (nonatomic) RNSScreenStackHeaderSubviewType type;
|
|
|
|
@end
|