Skip to content

Adding preferredContentSize#2529

Merged
guyca merged 4 commits into
wix:masterfrom
DavidCMurphy:preferredContentSize
Jan 16, 2018
Merged

Adding preferredContentSize#2529
guyca merged 4 commits into
wix:masterfrom
DavidCMurphy:preferredContentSize

Conversation

@DavidCMurphy
Copy link
Copy Markdown
Contributor

@DavidCMurphy DavidCMurphy commented Jan 15, 2018

So while building an iPad application using this navigation library i have come across the need to set the size on controllers presented through modalPresentationStyle = formSheet.

Though currently we don't have any prop that allows you to do so. Obviously this is iOS specific but i think some other people would like some flexibility in this regard.

example:

Navigation.showModal({
            screen: action$.screen,
            title: action$.title,
            animationType: 'slide-up',
            navigatorStyle: {
                modalPresentationStyle: 'formSheet',
                preferredContentSize: { width: 790, height: 560 }
            },
            passProps: action$.props
        })

@guyca
Copy link
Copy Markdown
Collaborator

guyca commented Jan 15, 2018

Thanks for the pr @DavidCMurphy
Could you please update the docs with the available modalPresentation styles as well?

@DavidCMurphy
Copy link
Copy Markdown
Contributor Author

Hey @guyca, this should work, let me know if i'm missing anything.

@guyca guyca merged commit a5ff07f into wix:master Jan 16, 2018
chilinh added a commit to chilinh/react-native-navigation that referenced this pull request Jan 22, 2018
* r_master:
  SetStyle fix (wix#2539)
  Update ISSUE_TEMPLATE
  fix(start app): show red screen in case an error is thrown while starting the app (wix#2556)
  Xcode 8 fixes
  fixed swizzle in xcode 8
  Back-port insets fix to v1
  Solved doc formatting issues (wix#2544)
  Update README.md (wix#2537)
  Update styling-the-navigator.md
  Adding preferredContentSize (wix#2529)
  Revert "setStyle to style the according TabBar (wix#2524)"
  setStyle to style the according TabBar (wix#2524)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants