/// <summary> /// Will apply the EditActiosn to the row. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="row">The row.</param> /// <param name="editRowActions">The edit row actions.</param> /// <returns></returns> public static IEZRow WithEditActions <T>(this IEZRow row, UITableViewRowAction[] editRowActions) { row.EditRowActions = editRowActions; return(row); }
/// <summary> /// Will apply the cell reuse identifier to the row. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="row">The row.</param> /// <param name="cellReuseIdentifier">The cell reuse identifier.</param> /// <returns></returns> public static IEZRow WithCellReuseIdentifier <T>(this IEZRow row, string cellReuseIdentifier) { row.ReuseIdentifier = cellReuseIdentifier; return(row); }
/// <summary> /// Applies the default styles to cell. /// </summary> /// <param name="cell">The cell.</param> /// <param name="row">The row.</param> /// <returns></returns> protected virtual UITableViewCell ApplyDefaultStyleToCell(UITableViewCell cell, IEZRow row) { cell.TextLabel.Text = row.Title; if (row.CellStyle == UITableViewCellStyle.Subtitle) { cell.DetailTextLabel.Text = row.SubTitle; } cell.Accessory = row.CellAccessory; var ezRow = row as EZRow; return(ezRow == null ? cell : ApplyDefaultStyleToEZRowConcrete(ezRow, cell)); }
/// <summary> /// Will apply the cell accessory to the row. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="row">The row.</param> /// <param name="cellAccessory">The cell accessory.</param> /// <returns></returns> public static IEZRow WithCellAccessory <T>(this IEZRow row, UITableViewCellAccessory cellAccessory) { row.CellAccessory = cellAccessory; return(row); }
/// <summary> /// Deques the reusable cell. /// </summary> /// <param name="tableView">The table view.</param> /// <param name="row">The row.</param> /// <returns></returns> protected virtual UITableViewCell DequeReusableCell(UITableView tableView, IEZRow row) => tableView.DequeueReusableCell(string.IsNullOrWhiteSpace(row.ReuseIdentifier) ? "cell" : row.ReuseIdentifier);