Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 7 additions & 1 deletion RCTBrowser.m
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,13 @@ @implementation RCTBrowser

[nav.navigationBar setTitleTextAttributes:
@{NSForegroundColorAttributeName:color}];
}
} else if ([key isEqualToString:@"presentationStyle"]) {
if ([obj isEqual: @"formSheet"]) {
nav.modalPresentationStyle = UIModalPresentationFormSheet;
} else if ([obj isEqual: @"pageSheet"]) {
nav.modalPresentationStyle = UIModalPresentationPageSheet;
}
}
}];

dispatch_async(dispatch_get_main_queue(), ^{
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,17 @@ Browser.open('https://google.com/', {
titleTintColor: processColor('#d64bbd'),
barTintColor: processColor('#d64bbd')
});

// To change the presentation style from the default, you can additionally pass in:
Browser.open('https://google.com/', {
presentationStyle: 'formSheet' // can be one of [undefined, 'pageSheet', 'formSheet']
});
// For differences, see:
// https://developer.apple.com/library/content/featuredarticles/ViewControllerPGforiPhoneOS/PresentingaViewController.html
```



[Descriptions of options and their defaults](https://github.com/TimOliver/TOWebViewController/blob/master/TOWebViewController/TOWebViewController.h)

### TODOs
Expand Down