GetCell() 공개 메소드

public GetCell ( UITableView tv ) : UITableViewCell
tv UITableView
리턴 UITableViewCell
        public override UITableViewCell GetCell(Cell item, UITableView tv)
        {
            var textVm = item.BindingContext as TextMessageViewModel;

            if (textVm != null)
            {
                var chatBubble = new ChatBubble(!textVm.IsMine, textVm.Text);
                return(chatBubble.GetCell(tv));
            }
            return(base.GetCell(item, tv));
        }
 public override UITableViewCell GetCell(Cell item, UITableView tv)
 {
     var textVm = item.BindingContext as TextMessageViewModel;
     if (textVm != null)
     {
         string text = textVm.ImageId.HasValue ? "<IOS client doesn't support image messages yet ;(>" : (textVm.IsMine ? "Me" : textVm.AuthorName) + ": " + textVm.Text;
         var chatBubble = new ChatBubble(!textVm.IsMine, text);
         return chatBubble.GetCell(tv);
     }
     return base.GetCell(item, tv);
 }
예제 #3
0
        public override UITableViewCell GetCell(Cell item, UITableViewCell reusableCell, UITableView tv)
        {
            var textVm = item.BindingContext as TextMessageViewModel;

            if (textVm != null)
            {
                string text       = textVm.ImageId.HasValue ? "<IOS client doesn't support image messages yet ;(>" : (textVm.IsMine ? "Me" : textVm.AuthorName) + ": " + textVm.Text;
                var    chatBubble = new ChatBubble(!textVm.IsMine, text);
                return(chatBubble.GetCell(tv));
            }
            return(base.GetCell(item, reusableCell, tv));
        }