Skip to content

Commit

Permalink
Nullable -> nonnull;
Browse files Browse the repository at this point in the history
  • Loading branch information
cuzv committed Mar 28, 2017
1 parent 54a5c79 commit 1dab212
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ bring `UINavigationBar` to` UIViewController`.

## Introduction

[KMNavigationBarTransition](https://github.com/MoZhouqi/KMNavigationBarTransition) provide a grace method deal with `navigationBar` transition, and requires zero line of code changes, which is awesome.
[KMNavigationBarTransition](https://github.com/MoZhouqi/KMNavigationBarTransition) provides a grace method deal with `navigationBar` transition, and requires zero line of code changes, which is awesome.

Here is the situation I couldn't doing well by using [KMNavigationBarTransition](https://github.com/MoZhouqi/KMNavigationBarTransition): first page is a product list, click product line, push to product details page, requires transparent `navigationBar`, while you scrolling, it could recover to default `navigationBar`'s appearance. Continue push to the next page, the `navigationBar` needs to look like the first page, which is the default appearance. (like the following 1st gif tells.)

Expand Down
2 changes: 1 addition & 1 deletion Sources/UIViewController+RRNavigationBar.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
/// Define a different look like UINavigationBar for specific ViewController, assigin to this property.
/// Try not change `translucent` property, which is may cause navigationBar flash when animation complete with extends container ViewController's view backgroundColor.
/// `hidden`property will have no effect, try use `setBackgroundImage:forBarMetrics:` & `shadowImage` make navigationBar invisible.
@property (nonatomic, strong, nullable) UINavigationBar *rr_navigationBar;
@property (nonatomic, strong, nonnull) UINavigationBar *rr_navigationBar;

@end
4 changes: 2 additions & 2 deletions Sources/UIViewController+RRNavigationBar.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ - (void)set_rr_equalNavigationBarInTransition:(BOOL)_rr_equalNavigationBarInTran

#pragma mark - Public

- (UINavigationBar *)rr_navigationBar {
- (nonnull UINavigationBar *)rr_navigationBar {
UINavigationBar *bar = objc_getAssociatedObject(self, _cmd);
if (bar) {
return bar;
Expand All @@ -55,7 +55,7 @@ - (UINavigationBar *)rr_navigationBar {
return bar;
}

- (void)setRr_navigationBar:(UINavigationBar *)rr_navigationBar {
- (void)setRr_navigationBar:(nonnull UINavigationBar *)rr_navigationBar {
objc_setAssociatedObject(self, @selector(rr_navigationBar), rr_navigationBar, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
rr_navigationBar._holder = self;
}
Expand Down

0 comments on commit 1dab212

Please sign in to comment.