本文整理汇总了C#中UITableView.CellAt方法的典型用法代码示例。如果您正苦于以下问题:C# UITableView.CellAt方法的具体用法?C# UITableView.CellAt怎么用?C# UITableView.CellAt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UITableView
的用法示例。
在下文中一共展示了UITableView.CellAt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RowSelected
public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
{
tableView.CellAt (NSIndexPath.FromRowSection (selected, 0)).Accessory = UITableViewCellAccessory.None;
selected = indexPath.Row;
tableView.CellAt (indexPath).Accessory = UITableViewCellAccessory.Checkmark;
tableView.DeselectRow (indexPath, true);
}
示例2: RowSelected
public override void RowSelected (UITableView tableView, NSIndexPath indexPath)
{
TCStatusCell oldCell = (TCStatusCell)tableView.CellAt (this.parentViewController.tempIndexPath);
if (oldCell != null)
oldCell.unCheck ();
TCStatusCell selectedCell = (TCStatusCell)tableView.CellAt (indexPath);
selectedCell.check ();
tableView.DeselectRow(indexPath, false);
if (this.parentViewController != null) {
this.parentViewController.setTempIndex (indexPath);
}
}
示例3: Selected
public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath indexPath)
{
RootElement root = (RootElement) Parent.Parent;
if (RadioIdx != root.RadioSelected){
var cell = tableView.CellAt (root.PathForRadio (root.RadioSelected));
if (cell != null)
cell.Accessory = UITableViewCellAccessory.None;
cell = tableView.CellAt (indexPath);
if (cell != null)
cell.Accessory = UITableViewCellAccessory.Checkmark;
root.RadioSelected = RadioIdx;
}
base.Selected (dvc, tableView, indexPath);
}
示例4: RowSelected
public override void RowSelected (UITableView tableView, NSIndexPath indexPath)
{
if (this.favoriteVC != null) {
this.favoriteVC.PerformSegue ("TCFavoriteToSpecialistProfileViewController", tableView.CellAt (indexPath));
tableView.DeselectRow (indexPath, true);
}
}
示例5: TogglePicker
private void TogglePicker(DialogViewController dvc, UITableView tableView, NSIndexPath path)
{
var sectionAndIndex = GetMySectionAndIndex(dvc);
if(sectionAndIndex.Key != null)
{
Section section = sectionAndIndex.Key;
int index = sectionAndIndex.Value;
var cell = tableView.CellAt(path);
if(isPickerPresent)
{
// Remove the picker.
cell.DetailTextLabel.TextColor = UIColor.Gray;
section.Remove(datePickerContainer);
isPickerPresent = false;
}
else
{
// Show the picker.
cell.DetailTextLabel.TextColor = UIColor.Red;
datePickerContainer = new UIViewElement(string.Empty, datePicker, false);
section.Insert(index + 1, UITableViewRowAnimation.Bottom, datePickerContainer);
isPickerPresent = true;
}
}
}
示例6: RowSelected
public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
{
tableView.CellAt(indexPath).Accessory = UITableViewCellAccessory.Checkmark;
for (int i = 0; i < _questions[indexPath.Section].PossibleAnswers.Count; i++) {
if (i == indexPath.Row) {
_questions[indexPath.Section].PossibleAnswers[i].IsSelected = true;
}
else {
_questions[indexPath.Section].PossibleAnswers[i].IsSelected = false;
var currentCell = tableView.CellAt(NSIndexPath.FromRowSection(i, indexPath.Section));
if (currentCell != null)
currentCell.Accessory = UITableViewCellAccessory.None;
}
}
}
示例7: RowSelected
public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
{
UITableViewCell cell = tableView.CellAt(indexPath);
if (cell == null)
return;
bool searchResult = (tableView == ParentController.SearchDisplayController.SearchResultsTableView);
cell.Selected = false;
bool selected = (cell.Accessory == UITableViewCellAccessory.Checkmark);
CharacterFriend selectedFriend = (searchResult ? FilteredFriendsList[indexPath.Row] : FriendsList[indexPath.Row]);
if (ParentController.Mode == FriendPickerViewController.SelectionMode.Multiple)
{
cell.Accessory = (selected ? UITableViewCellAccessory.None : UITableViewCellAccessory.Checkmark);
if (selected)
SelectedItems.Remove(selectedFriend);
else
SelectedItems.Add(selectedFriend);
}
else
{
SelectedItems.Clear();
SelectedItems.Add(selectedFriend);
if (ParentController.FriendSelected != null)
{
ParentController.FriendSelected(ParentController, selectedFriend);
}
ParentController.NavigationController.PopViewController(true);
}
}
示例8: Selected
public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath path)
{
Value = !Value;
var cell = tableView.CellAt (path);
ConfigCell (cell);
base.Selected (dvc, tableView, path);
}
示例9: RowSelected
public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
{
new UIAlertView("Linha Selecionada", tableItems[indexPath.Row], null, "OK", null).Show();
var cell = tableView.CellAt(indexPath);
cell.Accessory = UITableViewCellAccessory.Checkmark;
tableView.DeselectRow(indexPath, true); // Convenção do iOS para remover a seleção
}
示例10: RowSelected
public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
{
System.Diagnostics.Debug.WriteLine("DeviceViewController RowSelected");
System.Diagnostics.Debug.WriteLine(tableView.CellAt(indexPath));
switch (indexPath.Section)
{
case 0:
{
switch (indexPath.Row)
{
case 0: // sms
_modeChangeRequested = true;
Vm.SetModeSmsCommand.Execute(null);
break;
case 1: // pano
_modeChangeRequested = true;
Vm.SetModePanoCommand.Execute(null);
break;
case 2: // astro
_modeChangeRequested = true;
Vm.SetModeAstroCommand.Execute(null);
break;
}
}
break;
}
tableView.DeselectRow(indexPath, true);
}
示例11: RowSelected
public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
{
var newIsCompleted = !tasks [indexPath.Row].IsCompleted;
tasks [indexPath.Row].IsCompleted = newIsCompleted;
var cell = tableView.CellAt (indexPath);
cell.Accessory = newIsCompleted ? UITableViewCellAccessory.Checkmark : UITableViewCellAccessory.None;
cell.TextLabel.TextColor = newIsCompleted ? UIColor.Green : UIColor.Black;
}
示例12: RowSelected
public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
{
TodoItem todoItem = _taskManager.TodoItems[indexPath.Row];
_taskManager.ToggleItemCompletion(todoItem);
var cell = tableView.CellAt (indexPath);
cell.Accessory = todoItem.IsCompleted ? UITableViewCellAccessory.Checkmark : UITableViewCellAccessory.None;
cell.TextLabel.TextColor = todoItem.IsCompleted ? UIColor.Green : UIColor.Black;
}
示例13: RowSelected
public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
{
// Uncheck the previous row
if (_previousRow != null)
tableView.CellAt(_previousRow).Accessory = UITableViewCellAccessory.None;
// Do something with the row
var row = indexPath.Row;
Settings.SelectedIndex = row;
tableView.CellAt(indexPath).Accessory = UITableViewCellAccessory.Checkmark;
Console.WriteLine("{0} selected",_controller.Items[row]);
_previousRow = indexPath;
// This is what the Settings does under Settings>Mail>Show on an iPhone
tableView.DeselectRow(indexPath,false);
}
示例14: RowSelected
public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
{
if(check)
(tableView.CellAt (indexPath) as ProfielenTableViewCell).toggleCheckbox ();
else
_appController.ProfileSelected (Profielen[indexPath.Row].name);
tableView.DeselectRow (indexPath,true);
}
示例15: RowSelected
// Called when a row is touched
public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
{
//When you select a row, that row will be highlighted in blue. Set true to deselect the row
tableView.DeselectRow (indexPath, true);
//remove the checkmark on previous selection after first selection
if (this.previous != null) {
UITableViewCell prevCell = tableView.CellAt (this.previous);
prevCell.Accessory = UITableViewCellAccessory.None;
}
//Select only one row
UITableViewCell cell = tableView.CellAt (indexPath);
cell.Accessory = UITableViewCellAccessory.Checkmark;
//Replace current select to become next selection's previous select
previous = indexPath;
}