【发布时间】:2011-10-17 21:58:57
【问题描述】:
MonotouchDialog 让创建 UITableView 对话框变得非常容易,但有时会弹出类似这样的问题:
MonoTouch Dialog. Buttons with the Elements API
现在,我有一个类似的问题,但完全不同:
List<User> users = GetUsers();
var root =
new RootElement ("LoginScreen"){
new Section ("Enter your credentials") {
foreach(var user in users)
new StyledStringElement (user.Name, ()=> {
// tap on an element (but which one exactly?)
}
),
}
navigation.PushViewController (new MainController (root), true);
现在StyledStringElement的构造函数的第二个参数的类型是NSAction委托,并且不带任何参数,现在我不知道如何确定究竟是哪个元素被点击了。
如何获得?
【问题讨论】:
标签: c# uitableview xamarin.ios monotouch.dialog