c# - Return data from another view Xamarin.iOS -
what i'm trying sounds simple haven't seen example or been able find one.
i'm adding view navigation controller following way:
viewcontrollers.companiesviewcontroller companiesviewctrl = this.storyboard.instantiateviewcontroller ("companyselectview") viewcontrollers.companiesviewcontroller; this.navigationcontroller.pushviewcontroller(companiesviewctrl, true);
it bring view list of companies , need user selects company, i'll store information (i this) return previous view , , maybe run event. can point me in right direction how this?
thanks :)
the simplest solution add event companiesviewcontroller
, raise when user selects company. navigation controller pushed companiesviewctrl
can subscribe event , notified when company selected.
class companiesviewcontroller { public event action<company> companyselected; public override void rowselected (uitableview tableview, nsindexpath indexpath) { //raise companyselected event if isn't null , pass selected company. } }
all have subscribe companyselected event before pushing controller.
Comments
Post a Comment