Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

隐藏导航栏返回按钮标题 #24

Open
xaoxuu opened this issue Jul 14, 2017 · 0 comments
Open

隐藏导航栏返回按钮标题 #24

xaoxuu opened this issue Jul 14, 2017 · 0 comments

Comments

@xaoxuu
Copy link
Owner

xaoxuu commented Jul 14, 2017

接口:

@interface UINavigationItem (AXExtension)

/**
 隐藏返回按钮的标题
 */
- (void)ax_hideBackBarButtonTitle;

/**
 隐藏返回按钮(同时也不能右划返回)
 */
- (void)ax_hideBackBarButton;

@end

实现:

@implementation UINavigationItem (AXExtension)

/**
 隐藏返回按钮的标题
 */
- (void)ax_hideBackBarButtonTitle{
    self.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil];
}


/**
 隐藏返回按钮(同时也不能右划返回)
 */
- (void)ax_hideBackBarButton{
    self.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil];
}


@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant