Opening a page by code in Xamarin.iOS -


below code navigates page in swift.
how can run code in xamarin.ios ?

let storyboard : uistoryboard = uistoryboard(name: "main", bundle:nil)  let nextviewcontroller = storyboard.instantiateviewcontrollerwithidentifier("nextview") nextviewcontroller self.presentviewcontroller(nextviewcontroller, animated:true, completion:nil) 

here's translation:

var storyboard = uistoryboard.fromname("main",null); var nextviewcontroller = storyboard.instantiateviewcontroller("nextview") nextviewcontroller; presentviewcontroller(nextviewcontroller, true, null); 

or if using async await:

var storyboard = uistoryboard.fromname("main",null); var nextviewcontroller = storyboard.instantiateviewcontroller("nextview") nextviewcontroller; await presentviewcontrollerasync(nextviewcontroller, true); 

Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -