Beispiel #1
0
        public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
        {
            var cell = tableView.DequeueReusableCell("cell1") as DropDownCell;

            if (cell == null)
            {
                cell       = new DropDownCell(UITableViewCellStyle.Default, "cell1");
                cell.Frame = new CoreGraphics.CGRect(cell.Frame.X, cell.Frame.Y, cell.Frame.Width, cell.Frame.Height);
            }

            // selection color
            if (this._CellSBackgroundColor != UIColor.Clear)
            {
                cell.SelectionStyle = UITableViewCellSelectionStyle.Default;
                UIView bgColorView = new UIView();
                bgColorView.BackgroundColor         = this._CellSBackgroundColor;
                cell.SelectedBackgroundView         = bgColorView;
                cell.TextLabel.HighlightedTextColor = this._CellSTextColor;
            }
            // add text
            cell.TextLabel.Text = this._SourceData [indexPath.Row];
            if (this._FontSize > 1)
            {
                cell.TextLabel.Font = UIFont.SystemFontOfSize(this._FontSize);
            }
            return(cell);
        }
		public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath)
		{
			var cell = tableView.DequeueReusableCell ("cell1") as DropDownCell;
			if (cell == null) {
				cell = new DropDownCell (UITableViewCellStyle.Default, "cell1");
				cell.Frame = new CoreGraphics.CGRect (cell.Frame.X, cell.Frame.Y, cell.Frame.Width, cell.Frame.Height);
			}

			// selection color
			if (this._CellSBackgroundColor != UIColor.Clear) {
				cell.SelectionStyle = UITableViewCellSelectionStyle.Default;
				UIView bgColorView = new UIView ();
				bgColorView.BackgroundColor = this._CellSBackgroundColor;
				cell.SelectedBackgroundView = bgColorView;
				cell.TextLabel.HighlightedTextColor = this._CellSTextColor;
			}

			// add text
			cell.TextLabel.Text = this._SourceData [indexPath.Row];
			if (this._FontSize > 1) {
				cell.TextLabel.Font = UIFont.SystemFontOfSize (this._FontSize);
			}
			return cell;
		}