-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
[Nav] Add support for bar button icons and left buttons #263
Conversation
7bbe3f7
to
63dbe44
Compare
@@ -1123,6 +1123,12 @@ - (NSDictionary *)customBubblingEventTypes | |||
@"captured": @"onNavigationCompleteCapture" | |||
} | |||
}, | |||
@"topNavLeftButtonTap": @{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should migrate these out of RCTUIManager at some point - they should probably be regular event emitter stuff.
cc @ericvicenti as well. |
Updated to use RCT_CUSTOM_VIEW_PROPERTY. I left the nav event in RCTUIManager for now, but was thinking they eventually belong in one of the RCTNav*Manager files. |
0137261
to
36745d3
Compare
It will be awesome if this feature is merged :) |
50b6283
to
1428c3e
Compare
NavigatorIOS supports four new properties: - **rightButtonImageSource:** The source of an image to display in the top right. This must be a static image since UINavigationController only supports UIImages. Adding support for UIImageViews (or arbitrary views) is more complicated because custom views do not fade on touch and do not have hit slop the same way that UIImage buttons do. Usage: `rightButtonImageSource: ix('ImageName')` - **backButtonImageSource:** Use a custom image for the back button. This does not replace the back caret (`<`) but instead replaces the text next to it. - **leftButtonTitle**: Text for the left nav button, which supersedes the previous nav item's back button when specified. The main use case for this is your initial screen/UIVC which has nothing to go back to (since it is the first VC on the stack) but need to display a left button. This does hide the back button if there would have been one otherwise. - **leftButtonImageSource:** Image source for the left button, supersedes the left button title. Added UIExplorer example to demonstrate.
* remove a stale event from the native tracking queue that prevents every other click from registering * comment change inline
NavigatorIOS supports four new properties:
rightButtonImageSource: ix('ImageName')
<
) but instead replaces the text next to it.Added UIExplorer example to demonstrate.