How to display a view controller like a modal?

I want to achieve something like the image below. I tried using this code to present it like that but still ended up on showing my view controller full screen. Also I want to change the view controller's size.

`

var myViewController = _storyboard.InstantiateViewController("myController");
myViewController.ModalPresentationStyle = UIModalPresentationStyle.FormSheet;

myViewController.PreferredContentSize = new CGSize(_deviceWidth - 30, 561);

PresentViewController(myViewController, true, null);

`

Answers

Sign In or Register to comment.