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

Request: Make scrollNavigationBar nullable #45

Open
Errortype520 opened this issue Apr 1, 2016 · 0 comments
Open

Request: Make scrollNavigationBar nullable #45

Errortype520 opened this issue Apr 1, 2016 · 0 comments

Comments

@Errortype520
Copy link

I think scrollingnavigationbar should be nullable for use with Swift.

@interface UINavigationController (GTScrollNavigationBarAdditions)

@property(strong, nonatomic, readonly, nullable) GTScrollNavigationBar *scrollNavigationBar;

@end


@implementation UINavigationController (GTScrollNavigationBarAdditions)

@dynamic scrollNavigationBar;

- (nullable GTScrollNavigationBar*)scrollNavigationBar
{
    return [self.navigationBar isKindOfClass:[GTScrollNavigationBar class]] ? (GTScrollNavigationBar*)self.navigationBar : nil;
}

@end

Swift example:

self.navigationController?.scrollNavigationBar?.scrollView = self.tableView
@Errortype520 Errortype520 changed the title Request: Make scrollNavigationBar nulable Request: Make scrollNavigationBar nullable Apr 1, 2016
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