Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0bca26d
Preview API
birkir Nov 19, 2017
1fa55e0
Merge branch 'master' into feature/preview-peek-pop
birkir Nov 19, 2017
ea7c9c5
Merge branch 'master' into feature/preview-peek-pop
birkir Nov 20, 2017
43729dc
Added preview actions and fail-guard wrappers
birkir Nov 22, 2017
c75059d
Merge branch 'master' of github.com:wix/react-native-navigation into …
birkir Nov 22, 2017
7348b5e
Merge branch 'feature/preview-peek-pop' of github.com:birkir/react-na…
birkir Nov 22, 2017
11a90e7
Remove old setters
birkir Nov 22, 2017
62f6b38
Moved from passProps to actionParams
birkir Nov 22, 2017
8fbb7dd
Move findNodeHandle to internal method
birkir Nov 22, 2017
8fde44c
Removing findNodeHandle
birkir Nov 22, 2017
5c0c1dc
Added height and option to dont 'pop' the view controller
birkir Nov 22, 2017
1ee66f5
Merge branch 'master' into feature/preview-peek-pop
birkir Nov 22, 2017
c070f4d
Documentation update for peek and pop
birkir Nov 22, 2017
688cc40
Document how to access button press events
birkir Nov 22, 2017
7bea2d8
Commit by default in example. Because it's cool
birkir Nov 22, 2017
07628f3
Merge branch 'master' into feature/preview-peek-pop
gran33 Nov 23, 2017
3456698
Merge branch 'master' into feature/preview-peek-pop
guyca Nov 23, 2017
726bb36
Merge branch 'master' into feature/preview-peek-pop
birkir Nov 23, 2017
acc9ea1
Docs and if elses ifs then
birkir Nov 23, 2017
bfc805e
Unregister previous ViewController on attempt to preview.
birkir Nov 28, 2017
9372a19
Merge branch 'master' into feature/preview-peek-pop
birkir Nov 28, 2017
7c98c2b
Merge conflict fail
birkir Nov 28, 2017
25e7e97
Merge branch 'master' into feature/preview-peek-pop
birkir Nov 29, 2017
a983d41
Merge branch 'master' into feature/preview-peek-pop
birkir Dec 6, 2017
cf5a2b3
Merge branch 'master' into feature/preview-peek-pop
birkir Dec 11, 2017
a007483
Merge branch 'master' into feature/preview-peek-pop
guyca Dec 13, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ios/RCCNavigationController.m
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ - (void)performAction:(NSString*)performAction actionParams:(NSDictionary*)actio
if ([self.topViewController isKindOfClass:[RCCViewController class]])
{
RCCViewController *topViewController = ((RCCViewController*)self.topViewController);
topViewController.previewController = nil;
[topViewController.navigationController unregisterForPreviewingWithContext:topViewController.previewContext];
viewController.previewActions = previewActions;
viewController.previewCommit = actionParams[@"previewCommit"] ? [actionParams[@"previewCommit"] boolValue] : YES;
NSNumber *previewHeight = actionParams[@"previewHeight"];
Expand All @@ -184,7 +186,7 @@ - (void)performAction:(NSString*)performAction actionParams:(NSDictionary*)actio
[bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
UIView *view = viewRegistry[previewViewID];
topViewController.previewView = view;
[topViewController registerForPreviewingWithDelegate:(id)topViewController sourceView:view];
topViewController.previewContext = [topViewController registerForPreviewingWithDelegate:(id)topViewController sourceView:view];
}];
});
topViewController.previewController = viewController;
Expand Down
1 change: 1 addition & 0 deletions ios/RCCViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ extern NSString* const RCCViewControllerCancelReactTouchesNotification;
@property (nonatomic) UIView *previewView;
@property (nonatomic) NSArray *previewActions;
@property (nonatomic) BOOL previewCommit;
@property (nonatomic) id previewContext;

+ (UIViewController*)controllerWithLayout:(NSDictionary *)layout globalProps:(NSDictionary *)globalProps bridge:(RCTBridge *)bridge;

Expand Down