Skip to content

Commit

Permalink
导航栏item间距处理优化
Browse files Browse the repository at this point in the history
  • Loading branch information
QuintGao committed Feb 24, 2022
1 parent cadd93b commit e621700
Show file tree
Hide file tree
Showing 15 changed files with 262 additions and 70 deletions.
2 changes: 1 addition & 1 deletion GKNavigationBar.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'GKNavigationBar'
s.version = '1.6.6'
s.version = '1.7.0'
s.license = 'MIT'
s.summary = '自定义导航栏--导航栏联动'
s.homepage = 'https://github.com/QuintGao/GKNavigationBar'
Expand Down
10 changes: 7 additions & 3 deletions GKNavigationBar/NavigationBar/GKNavigationBarConfigure.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,12 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign) GKNavigationBarBackStyle backStyle;

/// 是否禁止导航栏左右item间距调整,默认是NO
/// 1.7.0版本之后 只对带有GKCustomNavigationBar的控制器有效
@property (nonatomic, assign) BOOL gk_disableFixSpace;

/// 开启普通控制器的导航栏item间距调整,只能在对应的控制器中开启
@property (nonatomic, assign) BOOL openSystemFixSpace;

/// 导航栏左侧按钮距屏幕左边间距,默认是0,可自行调整
@property (nonatomic, assign) CGFloat gk_navItemLeftSpace;

Expand All @@ -73,9 +77,6 @@ NS_ASSUME_NONNULL_BEGIN
/// 状态栏类型,默认UIStatusBarStyleDefault
@property (nonatomic, assign) UIStatusBarStyle statusBarStyle;

// 调整导航栏间距时需要屏蔽的VC(默认nil),支持Class或NSString,NSString支持部分匹配如前缀
@property (nonatomic, strong) NSArray *shiledItemSpaceVCs;

/// 导航栏左右间距,内部使用
@property (nonatomic, assign, readonly) BOOL disableFixSpace;
@property (nonatomic, assign, readonly) CGFloat navItemLeftSpace;
Expand Down Expand Up @@ -109,6 +110,9 @@ NS_ASSUME_NONNULL_BEGIN
/// 获取bundle
- (NSBundle *)gk_libraryBundle;

/// 是否禁止调整导航栏item间距
- (BOOL)fixNavItemSpaceDisabled;

@end

// from QMUI
Expand Down
5 changes: 5 additions & 0 deletions GKNavigationBar/NavigationBar/GKNavigationBarConfigure.m
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ - (NSBundle *)gk_libraryBundle {
return [NSBundle bundleWithURL:bundleURL];
}

- (BOOL)fixNavItemSpaceDisabled {
// NSLog(@"%d---%d", self.gk_disableFixSpace, self.openSystemFixSpace);
return self.gk_disableFixSpace && !self.openSystemFixSpace;
}

@end

@interface GKPortraitViewController : UIViewController
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ NS_ASSUME_NONNULL_BEGIN
/// 开启系统导航与GKNavigationBar过渡处理,需要在显示系统导航栏的控制器中调用显示导航栏方法
@property (nonatomic, assign) BOOL gk_openSystemNavHandle;

/// 该导航栏是由内部隐藏的
@property (nonatomic, assign) BOOL gk_hideNavigationBar;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,13 @@ - (BOOL)gk_openSystemNavHandle {
return [objc_getAssociatedObject(self, &kAssociatedObjectKey_openSystemNavHandle) boolValue];
}

static char kAssociatedObjectKey_hideNavigationBar;
- (void)setGk_hideNavigationBar:(BOOL)gk_hideNavigationBar {
objc_setAssociatedObject(self, &kAssociatedObjectKey_hideNavigationBar, @(gk_hideNavigationBar), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

- (BOOL)gk_hideNavigationBar {
return [objc_getAssociatedObject(self, &kAssociatedObjectKey_hideNavigationBar) boolValue];
}

@end
16 changes: 8 additions & 8 deletions GKNavigationBar/NavigationBar/UINavigationItem+GKNavigationBar.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ - (void)gk_setLeftBarButtonItem:(UIBarButtonItem *)leftBarButtonItem {
}

- (void)gk_setLeftBarButtonItem:(UIBarButtonItem *)leftBarButtonItem animated:(BOOL)animated {
if (!GKConfigure.gk_disableFixSpace && leftBarButtonItem) {//存在按钮且需要调节
if (!GKConfigure.fixNavItemSpaceDisabled && leftBarButtonItem) {//存在按钮且需要调节
[self setLeftBarButtonItems:@[leftBarButtonItem] animated:animated];
} else {//不存在按钮,或者不需要调节
[self setLeftBarButtonItems:nil];
Expand All @@ -51,7 +51,7 @@ - (void)gk_setLeftBarButtonItems:(NSArray<UIBarButtonItem *> *)leftBarButtonItem
}

- (void)gk_setLeftBarButtonItems:(NSArray<UIBarButtonItem *> *)leftBarButtonItems animated:(BOOL)animated {
if (!GKConfigure.gk_disableFixSpace && leftBarButtonItems.count) {//存在按钮且需要调节
if (!GKConfigure.fixNavItemSpaceDisabled && leftBarButtonItems.count) {//存在按钮且需要调节
UIBarButtonItem *firstItem = leftBarButtonItems.firstObject;
CGFloat width = GKConfigure.gk_navItemLeftSpace - GKConfigure.gk_fixedSpace;
if (firstItem.width == width) {//已经存在space
Expand All @@ -71,7 +71,7 @@ - (void)gk_setRightBarButtonItem:(UIBarButtonItem *)rightBarButtonItem{
}

- (void)gk_setRightBarButtonItem:(UIBarButtonItem *)rightBarButtonItem animated:(BOOL)animated {
if (!GKConfigure.gk_disableFixSpace && rightBarButtonItem) {//存在按钮且需要调节
if (!GKConfigure.fixNavItemSpaceDisabled && rightBarButtonItem) {//存在按钮且需要调节
[self setRightBarButtonItems:@[rightBarButtonItem] animated:animated];
} else {//不存在按钮,或者不需要调节
[self setRightBarButtonItems:nil];
Expand All @@ -84,7 +84,7 @@ - (void)gk_setRightBarButtonItems:(NSArray<UIBarButtonItem *> *)rightBarButtonIt
}

- (void)gk_setRightBarButtonItems:(NSArray<UIBarButtonItem *> *)rightBarButtonItems animated:(BOOL)animated {
if (!GKConfigure.gk_disableFixSpace && rightBarButtonItems.count) {//存在按钮且需要调节
if (!GKConfigure.fixNavItemSpaceDisabled && rightBarButtonItems.count) {//存在按钮且需要调节
UIBarButtonItem *firstItem = rightBarButtonItems.firstObject;
CGFloat width = GKConfigure.gk_navItemRightSpace - GKConfigure.gk_fixedSpace;
if (firstItem.width == width) {//已经存在space
Expand Down Expand Up @@ -125,7 +125,7 @@ + (void)load {

- (void)gk_layoutSubviews {
[self gk_layoutSubviews];
if (GKConfigure.gk_disableFixSpace) return;
if (GKConfigure.fixNavItemSpaceDisabled) return;
if (![self isMemberOfClass:NSClassFromString(@"_UINavigationBarContentView")]) return;
id layout = [self valueForKey:@"_layout"];
if (!layout) return;
Expand All @@ -137,14 +137,14 @@ - (void)gk_layoutSubviews {

- (void)gk__updateMarginConstraints {
[self gk__updateMarginConstraints];
if (GKConfigure.gk_disableFixSpace) return;
if (GKConfigure.fixNavItemSpaceDisabled) return;
if (![self isMemberOfClass:NSClassFromString(@"_UINavigationBarContentViewLayout")]) return;
[self gk_adjustLeadingBarConstraints];
[self gk_adjustTrailingBarConstraints];
}

- (void)gk_adjustLeadingBarConstraints {
if (GKConfigure.gk_disableFixSpace) return;
if (GKConfigure.fixNavItemSpaceDisabled) return;
NSArray<NSLayoutConstraint *> *leadingBarConstraints = [self valueForKey:@"_leadingBarConstraints"];
if (!leadingBarConstraints) return;
CGFloat constant = GKConfigure.gk_navItemLeftSpace - GKConfigure.gk_fixedSpace;
Expand All @@ -156,7 +156,7 @@ - (void)gk_adjustLeadingBarConstraints {
}

- (void)gk_adjustTrailingBarConstraints {
if (GKConfigure.gk_disableFixSpace) return;
if (GKConfigure.fixNavItemSpaceDisabled) return;
NSArray<NSLayoutConstraint *> *trailingBarConstraints = [self valueForKey:@"_trailingBarConstraints"];
if (!trailingBarConstraints) return;
CGFloat constant = GKConfigure.gk_fixedSpace - GKConfigure.gk_navItemRightSpace;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,13 @@ NS_ASSUME_NONNULL_BEGIN
@property (nullable, nonatomic, strong) NSArray<UIBarButtonItem *> *gk_navRightBarButtonItems;

/// 是否禁止调整当前控制器导航栏间距,默认GKConfigure.gk_disableFixSpace
/// 仅当GKConfigure.gk_disableFixSpace为NO时有效
/// 对带有GKCustomNavigationBar的控制器有效
@property (nonatomic, assign) BOOL gk_disableFixNavItemSpace;

/// 是否开启当前控制器的导航栏item间距调整,默认NO
/// 对没有GKCustomNavigationBar的控制器有效
@property (nonatomic, assign) BOOL gk_openFixNavItemSpace;

/// 导航栏左右按钮距离屏幕边缘的距离,需在设置左右item之前设置此属性
@property (nonatomic, assign) CGFloat gk_navItemLeftSpace;
@property (nonatomic, assign) CGFloat gk_navItemRightSpace;
Expand Down
91 changes: 43 additions & 48 deletions GKNavigationBar/NavigationBar/UIViewController+GKNavigationBar.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,16 @@ + (void)load {
}

- (void)gk_viewDidLoad {
// bug fix #76,修改添加了子控制器后调整导航栏间距无效的bug
// 当创建了gk_navigationBar或者父控制器是导航控制器的时候才去调整导航栏间距
// 设置默认状态
self.gk_disableFixNavItemSpace = YES;
self.gk_openFixNavItemSpace = NO;

if ([self shouldHandleNavBar]) {
// 设置默认导航栏间距
self.gk_navItemLeftSpace = GKNavigationBarItemSpace;
self.gk_navItemRightSpace = GKNavigationBarItemSpace;
self.gk_disableFixNavItemSpace = [self checkFixNavItemSpace];
}

// 如果是根控制器,取消返回按钮
if (self.navigationController && self.navigationController.childViewControllers.count <= 1) {
if (!self.gk_NavBarInit) return;
Expand All @@ -69,6 +71,8 @@ - (void)gk_viewWillAppear:(BOOL)animated {
if (!self.navigationController) return;

if (self.gk_NavBarInit) {
self.gk_disableFixNavItemSpace = self.gk_disableFixNavItemSpace;
self.gk_openFixNavItemSpace = self.gk_openFixNavItemSpace;
// 隐藏系统导航栏
if (!self.navigationController.gk_openSystemNavHandle) {
[self hiddenSystemNavBar];
Expand All @@ -79,12 +83,16 @@ - (void)gk_viewWillAppear:(BOOL)animated {
[self.view bringSubviewToFront:self.gk_navigationBar];
}
}else {
if (self.navigationController && !self.navigationController.isNavigationBarHidden && ![self isNonFullScreen]) {
self.gk_disableFixNavItemSpace = self.gk_disableFixNavItemSpace;
self.gk_openFixNavItemSpace = self.gk_openFixNavItemSpace;
}
[self restoreSystemNavBar];
}

// bug fix #76,修改添加了子控制器后调整导航栏间距无效的bug
// 当创建了gk_navigationBar或者父控制器是导航控制器的时候才去调整导航栏间距
if ([self shouldHandleNavBar] && !self.gk_disableFixNavItemSpace) {
if (self.gk_openFixNavItemSpace) {
// 每次控制器出现的时候重置导航栏间距
if (self.gk_navItemLeftSpace == GKNavigationBarItemSpace) {
self.gk_navItemLeftSpace = GKConfigure.navItemLeftSpace;
Expand Down Expand Up @@ -113,16 +121,6 @@ - (void)gk_viewDidAppear:(BOOL)animated {
[self restoreSystemNavBar];
}

if (self.gk_disableFixNavItemSpace) {
[GKConfigure updateConfigure:^(GKNavigationBarConfigure * _Nonnull configure) {
configure.gk_disableFixSpace = YES;
}];
}else {
[GKConfigure updateConfigure:^(GKNavigationBarConfigure * _Nonnull configure) {
configure.gk_disableFixSpace = configure.disableFixSpace;
}];
}

[self gk_viewDidAppear:animated];
}

Expand Down Expand Up @@ -201,6 +199,8 @@ - (GKCustomNavigationBar *)gk_navigationBar {
objc_setAssociatedObject(self, &kAssociatedObjectKey_navigationBar, navigationBar, OBJC_ASSOCIATION_RETAIN_NONATOMIC);

self.gk_NavBarInit = YES;
self.gk_disableFixNavItemSpace = GKConfigure.disableFixSpace;
self.gk_openFixNavItemSpace = YES;
[self setupNavBarAppearance];
[self setupNavBarFrame];
}
Expand Down Expand Up @@ -507,18 +507,30 @@ - (void)setGk_navRightBarButtonItems:(NSArray<UIBarButtonItem *> *)gk_navRightBa
- (void)setGk_disableFixNavItemSpace:(BOOL)gk_disableFixNavItemSpace {
objc_setAssociatedObject(self, &kAssociatedObjectKey_disableFixNavItemSpace, @(gk_disableFixNavItemSpace), OBJC_ASSOCIATION_RETAIN_NONATOMIC);

if (GKConfigure.gk_disableFixSpace) return;
if (gk_disableFixNavItemSpace != GKConfigure.gk_disableFixSpace) {
[GKConfigure updateConfigure:^(GKNavigationBarConfigure * _Nonnull configure) {
configure.gk_disableFixSpace = gk_disableFixNavItemSpace;
}];
}
if (GKConfigure.gk_disableFixSpace == gk_disableFixNavItemSpace) return;
[GKConfigure updateConfigure:^(GKNavigationBarConfigure * _Nonnull configure) {
configure.gk_disableFixSpace = gk_disableFixNavItemSpace;
}];
}

- (BOOL)gk_disableFixNavItemSpace {
return [objc_getAssociatedObject(self, &kAssociatedObjectKey_disableFixNavItemSpace) boolValue];
}

static char kAssociatedObjectKey_openFixNavItemSpace;
- (void)setGk_openFixNavItemSpace:(BOOL)gk_openFixNavItemSpace {
objc_setAssociatedObject(self, &kAssociatedObjectKey_openFixNavItemSpace, @(gk_openFixNavItemSpace), OBJC_ASSOCIATION_RETAIN_NONATOMIC);

if (GKConfigure.openSystemFixSpace == gk_openFixNavItemSpace) return;
[GKConfigure updateConfigure:^(GKNavigationBarConfigure * _Nonnull configure) {
configure.openSystemFixSpace = gk_openFixNavItemSpace;
}];
}

- (BOOL)gk_openFixNavItemSpace {
return [objc_getAssociatedObject(self, &kAssociatedObjectKey_openFixNavItemSpace) boolValue];
}

static char kAssociatedObjectKey_navItemLeftSpace;
- (void)setGk_navItemLeftSpace:(CGFloat)gk_navItemLeftSpace {
objc_setAssociatedObject(self, &kAssociatedObjectKey_navItemLeftSpace, @(gk_navItemLeftSpace), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
Expand Down Expand Up @@ -695,24 +707,28 @@ - (void)setupNavBarAppearance {
self.gk_navTitle = nil;
}

- (void)setupNavBarFrame {
- (BOOL)isNonFullScreen {
BOOL isNonFullScreen = NO;
CGFloat viewW = GK_SCREEN_WIDTH;
CGFloat viewH = GK_SCREEN_HEIGHT;
// 防止在init方法中创建导航栏会提前触发viewDidLoad方法,所以做下判断
if (self.isViewLoaded) {
UIViewController *parentVC = self;
// 找到最上层的父类
// 找到最上层的父控制器
while (parentVC.parentViewController) {
parentVC = parentVC.parentViewController;
}
viewW = parentVC.view.frame.size.width;
viewH = parentVC.view.frame.size.height;
if (viewW == 0 || viewH == 0) return;
if (viewW == 0 || viewH == 0) return NO;

// 如果是通过present方式弹出且高度小于屏幕高度,则认为是非全屏
isNonFullScreen = self.presentingViewController && viewH < GK_SCREEN_HEIGHT;
}
return isNonFullScreen;
}

- (void)setupNavBarFrame {
BOOL isNonFullScreen = [self isNonFullScreen];

CGFloat navBarH = 0.0f;
if (GK_IS_iPad) { // iPad
Expand All @@ -736,41 +752,20 @@ - (void)setupNavBarFrame {
}
}
}
self.gk_navigationBar.frame = CGRectMake(0, 0, viewW, navBarH);
self.gk_navigationBar.frame = CGRectMake(0, 0, GK_SCREEN_WIDTH, navBarH);
[self.gk_navigationBar layoutSubviews];
}

- (BOOL)checkFixNavItemSpace {
// 判断是否需要屏蔽导航栏间距调整
__block BOOL exist = NO;
[GKConfigure.shiledItemSpaceVCs enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
if ([[obj class] isSubclassOfClass:[UIViewController class]]) {
if ([self isKindOfClass:[obj class]]) {
exist = YES;
*stop = YES;
}
}else if ([obj isKindOfClass:[NSString class]]) {
if ([NSStringFromClass(self.class) isEqualToString:obj]) {
exist = YES;
*stop = YES;
}else if ([NSStringFromClass(self.class) containsString:obj]) {
exist = YES;
*stop = YES;
}
}
}];
return exist;
}

- (void)hiddenSystemNavBar {
if (!self.navigationController.isNavigationBarHidden) {
self.navigationController.gk_hideNavigationBar = YES;
[self.navigationController setNavigationBarHidden:YES];
}
}

- (void)restoreSystemNavBar {
if (GKConfigure.gk_restoreSystemNavBar && [self shouldHandleNavBar]) {
if (self.navigationController.isNavigationBarHidden) {
if (self.navigationController.isNavigationBarHidden && self.navigationController.gk_hideNavigationBar) {
[self.navigationController setNavigationBarHidden:NO];
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
608FC6FF25469C9C003DB82F /* GKFloatTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 608FC6F625469C9C003DB82F /* GKFloatTransition.m */; };
608FC70025469C9C003DB82F /* GKFloatView.m in Sources */ = {isa = PBXBuildFile; fileRef = 608FC6F725469C9C003DB82F /* GKFloatView.m */; };
609E890D2644E3A300C15CB1 /* GKPresentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 609E890C2644E3A300C15CB1 /* GKPresentViewController.m */; };
60AF462C27C6061E00E6B76F /* GKDemo006ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 60AF462B27C6061E00E6B76F /* GKDemo006ViewController.m */; };
60B3D7A8258AFBAF003A4C7C /* GKDemo005ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 60B3D7A7258AFBAF003A4C7C /* GKDemo005ViewController.m */; };
60B70D77256F8A11008D62FC /* GKDemo004ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 60B70D76256F8A11008D62FC /* GKDemo004ViewController.m */; };
794AFC32242F07EA00BECA1B /* GKBaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 794AFC31242F07E900BECA1B /* GKBaseViewController.m */; };
Expand Down Expand Up @@ -85,6 +86,8 @@
608FC6F925469C9C003DB82F /* GKFloatView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GKFloatView.h; sourceTree = "<group>"; };
609E890B2644E3A300C15CB1 /* GKPresentViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GKPresentViewController.h; sourceTree = "<group>"; };
609E890C2644E3A300C15CB1 /* GKPresentViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GKPresentViewController.m; sourceTree = "<group>"; };
60AF462A27C6061E00E6B76F /* GKDemo006ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GKDemo006ViewController.h; sourceTree = "<group>"; };
60AF462B27C6061E00E6B76F /* GKDemo006ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GKDemo006ViewController.m; sourceTree = "<group>"; };
60B3D7A6258AFBAF003A4C7C /* GKDemo005ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GKDemo005ViewController.h; sourceTree = "<group>"; };
60B3D7A7258AFBAF003A4C7C /* GKDemo005ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GKDemo005ViewController.m; sourceTree = "<group>"; };
60B70D75256F8A11008D62FC /* GKDemo004ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GKDemo004ViewController.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -435,6 +438,8 @@
60B70D76256F8A11008D62FC /* GKDemo004ViewController.m */,
60B3D7A6258AFBAF003A4C7C /* GKDemo005ViewController.h */,
60B3D7A7258AFBAF003A4C7C /* GKDemo005ViewController.m */,
60AF462A27C6061E00E6B76F /* GKDemo006ViewController.h */,
60AF462B27C6061E00E6B76F /* GKDemo006ViewController.m */,
601BB2D3256CA96B001D59C8 /* GKDemoTransitionViewController.h */,
601BB2D4256CA96B001D59C8 /* GKDemoTransitionViewController.m */,
79C6AFEA237ED92900C636B9 /* GKDemoWebViewController.h */,
Expand Down Expand Up @@ -633,6 +638,7 @@
796CF8B8236D7BBF00983E9B /* GKToutiaoMineViewController.m in Sources */,
796CF8B7236D7BBF00983E9B /* GKToutiaoViewController.m in Sources */,
796CF8B1236D7BBF00983E9B /* UIView+Extension.m in Sources */,
60AF462C27C6061E00E6B76F /* GKDemo006ViewController.m in Sources */,
796CF8B0236D7BBF00983E9B /* GKDemoBaseViewController.m in Sources */,
796CF8CA236D7BBF00983E9B /* GKWYNewsLiveViewController.m in Sources */,
796CF8C7236D7BBF00983E9B /* GKWYNewsCommentViewController.m in Sources */,
Expand Down
3 changes: 1 addition & 2 deletions GKNavigationBarExample/GKNavigationBarExample/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,10 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
// 导航栏返回按钮样式
configure.backStyle = GKNavigationBarBackStyleBlack;
// 导航栏左右item间距
// configure.gk_disableFixSpace = YES;
configure.gk_navItemLeftSpace = 0.0f;
configure.gk_navItemRightSpace = 10.0f;
configure.gk_restoreSystemNavBar = YES;

configure.shiledItemSpaceVCs = @[NSClassFromString(@"TZPhotoPickerController"), @"TZAlbumPickerController", @"TZ"];
}];

[GKGestureConfigure setupCustomConfigure:^(GKGestureHandleConfigure * _Nonnull configure) {
Expand Down
Loading

0 comments on commit e621700

Please sign in to comment.