Friday, 15 March 2013

ios - fill iphone screen with view called from subview -



ios - fill iphone screen with view called from subview -

i have uiscrollview , uipagecontrol on view in app. scrollview contains 2 viewcontrollers (page1 , page2) , each page managed in separate class , has button's list.

my problem want open new controller when touch within 1 button page1, example, , new viewcontroller shown subview of scrollview (is new page1), pagecontrol , page2 beingness shown , scroll still works.

it's normal because in page1 code:

void handletouchupinside (object sender, eventargs e) { mynewcontroller mnc = new mynewcontroller(); this.view.addsubview(mnc.view); }

so question is..

how can set controller called fill screen? possible fill screen view called subview?

edited:

thanks

using storyboards

i recommend using storyboard editor design ui. control-drag button mynewcontroller. select modal action segue.

using code void handletouchupinside (object sender, eventargs e) { bool animated = true; nsaction completionhandler = null; mynewcontroller mnc = new mynewcontroller(); presentviewcontroller(mnc, animated, completionhandler); } dismissing

in either case, when want dismiss modal view phone call dismissviewcontroller mynewcontroller.

bool animated = true; nsaction completionhandler = null; dismissviewcontroller(animated, completionhandler);

ios monotouch

No comments:

Post a Comment