当前位置: 首页>>代码示例>>C#>>正文


C# MonoTouch.DequeueReusableCell方法代码示例

本文整理汇总了C#中MonoTouch.DequeueReusableCell方法的典型用法代码示例。如果您正苦于以下问题:C# MonoTouch.DequeueReusableCell方法的具体用法?C# MonoTouch.DequeueReusableCell怎么用?C# MonoTouch.DequeueReusableCell使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MonoTouch的用法示例。


在下文中一共展示了MonoTouch.DequeueReusableCell方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetCell

        public override MonoTouch.UIKit.UITableViewCell GetCell(MonoTouch.UIKit.UITableView tv)
        {
            // try and dequeue a cell object to reuse. if one doesn't exist, create a new one
            UserGroupCell cell = tv.DequeueReusableCell (cellKey) as UserGroupCell;
            if (cell == null) {
                cell = new UI.CustomElements.UserGroupCell (usergroup);
            }
            cell.UpdateCell(usergroup);

            return cell;
        }
开发者ID:kenibarwick,项目名称:ComDayBe2013,代码行数:11,代码来源:UserGroupElement.cs

示例2: GetCell

        public override MonoTouch.UIKit.UITableViewCell GetCell(MonoTouch.UIKit.UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath)
        {
            var cell = tableView.DequeueReusableCell("cell") as UITableViewCell;

            if (cell == null)
                cell = new UITableViewCell();

            cell.TextLabel.Text = _stuff[indexPath.Row];

            return cell;
        }
开发者ID:GrimmRanger,项目名称:RefreshViews,代码行数:11,代码来源:DemoTableSource.cs

示例3: GetCellImpl

        protected override MonoTouch.UIKit.UITableViewCell GetCellImpl(MonoTouch.UIKit.UITableView tv)
		{
			// try and dequeue a cell object to reuse. if one doesn't exist, create a new one
			ExhibitorCell cell = tv.DequeueReusableCell (cellKey) as ExhibitorCell;
			if (cell == null) {
				cell = new UI.CustomElements.ExhibitorCell (exhibitor);
			}
			cell.UpdateCell(exhibitor);

			return cell;
		}
开发者ID:slodge,项目名称:mobile-samples,代码行数:11,代码来源:ExhibitorElement.cs

示例4: GetCell

        public override MonoTouch.UIKit.UITableViewCell GetCell(MonoTouch.UIKit.UITableView tv)
        {
            var cell = tv.DequeueReusableCell(CellKey);
            if (cell == null){
                if (_full)
                    cell = GistDetailViewCell.Create();
                else
                    cell = GistDetailViewCell.CreateNoBottom();

                cell.BackgroundView = new CellBackgroundView();
            }

            cell.SelectionStyle = (Tapped != null) ? UITableViewCellSelectionStyle.Blue : UITableViewCellSelectionStyle.None;
            cell.Accessory = (Tapped != null) ? UITableViewCellAccessory.DisclosureIndicator : UITableViewCellAccessory.None;

            var gcell = cell as GistDetailViewCell;
            if (gcell == null)
                return cell;


            var str = string.IsNullOrEmpty(_gist.Description) ? "No Description" : _gist.Description;

            //We prefer the filename, so lets try and get it if it exists
            string filename = null;
            if (_gist.Files.Count > 0)
            {
                var iter = _gist.Files.Keys.GetEnumerator();
                iter.MoveNext();
                filename = iter.Current;
            }

            //Set the name (If we have no filename, fall back to the username)
            var name = (filename == null) ? (_gist.User == null ? "Unknown" : _gist.User.Login) : filename;
            var imageUri = (_gist.User == null) ? null : new Uri(_gist.User.AvatarUrl);
            var img = ImageLoader.DefaultRequestImage(imageUri, this);
            if (img != null)
                Image = img;

            if (_full)
                gcell.SetInformation(Image, name, _gist.CreatedAt.ToDaysAgo(), str, _gist.Forks.Count, _gist.Comments, 0);
            else
                gcell.SetInformation(Image, name, _gist.CreatedAt.ToDaysAgo(), str);

            return gcell;
        }
开发者ID:envy4s,项目名称:Gistacular,代码行数:45,代码来源:GistDetailElement.cs

示例5: GetCell

        public override UITableViewCell GetCell(MonoTouch.UIKit.UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath)
        {
            var termsinsection = filteredDictionaryItems.FindAll(x => x.StartsWith(filteredSectionList[indexPath.Section]));

            string dictionaryItem = termsinsection[indexPath.Row];
            string cellID = "CellID";

            UITableViewCell cell = tableView.DequeueReusableCell(cellID);
            if(cell == null)
            {
                cell = new UITableViewCell(UITableViewCellStyle.Default, cellID);
                cell.Accessory = UITableViewCellAccessory.DisclosureIndicator;
            }
            cell.TextLabel.Text = dictionaryItem;
            return cell;
        }
开发者ID:kevinsheffield,项目名称:MonoTouchDemos,代码行数:16,代码来源:Main.cs


注:本文中的MonoTouch.DequeueReusableCell方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。