-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support iOS system item icons for top bar (#4547)
- Loading branch information
1 parent
54569ee
commit 7a26ea9
Showing
8 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#import <UIKit/UIKit.h> | ||
#import <React/RCTConvert.h> | ||
|
||
@interface RCTConvert (UIBarButtonSystemItem) | ||
|
||
+ (UIBarButtonSystemItem)UIBarButtonSystemItem:(id)json; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#import <UIKit/UIKit.h> | ||
#import "RCTConvert+UIBarButtonSystemItem.h" | ||
|
||
@implementation RCTConvert (UIBarButtonSystemItem) | ||
|
||
RCT_ENUM_CONVERTER(UIBarButtonSystemItem, (@{ | ||
@"done" : @(UIBarButtonSystemItemDone), | ||
@"cancel" : @(UIBarButtonSystemItemCancel), | ||
@"edit" : @(UIBarButtonSystemItemEdit), | ||
@"save" : @(UIBarButtonSystemItemSave), | ||
@"add" : @(UIBarButtonSystemItemAdd), | ||
@"flexibleSpace" : @(UIBarButtonSystemItemFlexibleSpace), | ||
@"fixedSpace" : @(UIBarButtonSystemItemFixedSpace), | ||
@"compose" : @(UIBarButtonSystemItemCompose), | ||
@"reply" : @(UIBarButtonSystemItemReply), | ||
@"action" : @(UIBarButtonSystemItemAction), | ||
@"organize" : @(UIBarButtonSystemItemOrganize), | ||
@"bookmarks" : @(UIBarButtonSystemItemBookmarks), | ||
@"search" : @(UIBarButtonSystemItemSearch), | ||
@"refresh" : @(UIBarButtonSystemItemRefresh), | ||
@"stop" : @(UIBarButtonSystemItemStop), | ||
@"camera" : @(UIBarButtonSystemItemCamera), | ||
@"trash" : @(UIBarButtonSystemItemTrash), | ||
@"play" : @(UIBarButtonSystemItemPlay), | ||
@"pause" : @(UIBarButtonSystemItemPause), | ||
@"rewind" : @(UIBarButtonSystemItemRewind), | ||
@"fastForward" : @(UIBarButtonSystemItemFastForward), | ||
@"undo" : @(UIBarButtonSystemItemUndo), | ||
@"redo" : @(UIBarButtonSystemItemRedo), | ||
}), UIBarButtonSystemItemDone, integerValue) | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters