c# - Change View Controller on UITableViewCell Tap -



c# - Change View Controller on UITableViewCell Tap -

i'm trying alter view controller when taps on table view cell. im not doing conventional way. submethoding method detects tap utilize other class. here how doing it:

tablesource.cs

public override void rowselected (uitableview tableview, nsindexpath indexpath) { if (onrowselected != null) { onrowselected (this, new rowselectedeventargs (tableview, indexpath)); } } public class rowselectedeventargs : eventargs { public uitableview tableview { get; set; } public nsindexpath indexpath { get; set; } public rowselectedeventargs(uitableview tableview, nsindexpath indexpath) : base() { this.tableview = tableview; this.indexpath = indexpath; } } public event eventhandler<rowselectedeventargs> onrowselected;

request.cs

tablesourcetable.onrowselected += (object sender, tablesource<datum>.rowselectedeventargs e) => { vc = new instagrammodalcontroller (){instadata = tablesourcetable.instadata[e.indexpath.row]}; this.navcontrol.pushviewcontroller(this.vc,true); this.getmediaid(tablesourcetable.instadata[e.indexpath.row].link); new uialertview(tablesourcetable.instadata[e.indexpath.row].user.full_name.tostring(), tablesourcetable.instadata[e.indexpath.row].caption.text.tostring(), null, "ok", null).show(); e.tableview.deselectrow (e.indexpath, true); };

that code tablesource class , okay change.

c# ios uitableview xamarin

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -