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
Post a Comment