Hi
I am trying to implement a splitview app .The master view is a table
viewcontroller.I am trying to implement the functionality that when user
clicks on a row, a detail view controller should get launched.I read in
Apple documentation that you need to override *didSelectRowAtIndexPath*
method .The corresponding method for that in Mono is *RowSelected*(). In
this function you need to first deselect the currently selected row by using
tableView.DeselectRow(indexPath,false);(which corresponds to tableView
deselectRowAtIndexPath:indexPath animated:NO ).Here tableView is instance of
UItableview and indexPath is the NSIndexPath argument.Following that you
need to create a viewcontroller and then push it on the navigation stack.I
have followed all the above steps. This is my code:
public override void RowSelected (UITableView
tableView, NSIndexPath indexPath)
{
// Navigation logic may go here -- for example,
create and push another
view controller
tableView.DeselectRow(indexPath,false);
ExampleVC eview = new ExampleVC();
if (indexPath.Row == 0)
this.controller.NavigationController.PushViewController(eview,true);
}
//ExampleVC is just an example viewcontroller that I have created.I want to
check whether it gets launched when the user clicks on the first row.
this represents the class DataSource which has been derived from
UITableViewSource
It doesnt work. Is there any problem with the code? Is there any thing which
I may have left out?
I have read that you need to assign weak delegate,though I am not very
sure..
Any help would be most appreciated...
Thx
akaash
--
View this message in context:
http://monotouch.2284126.n4.nabble.com/tableview-row-selection-doesnt-work-tp4655576.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch