コード例 #1
0
        private void ConfigureCommentsTable()
        {
            _commentsTableViewSource = new CommentsTableViewSource(commentsTableView);

            commentsTableView.Source = _commentsTableViewSource;
            commentsTableView.ReloadData();
        }
コード例 #2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            View.BackgroundColor = UIColor.White;

            CreateView();

            _tableSource             = new CommentsTableViewSource(_presenter, Post);
            _tableSource.CellAction += CellAction;
            _tableSource.TagAction  += TagAction;

            _commentsTable.SeparatorStyle  = UITableViewCellSeparatorStyle.None;
            _commentsTable.Bounces         = false;
            _commentsTable.AllowsSelection = false;
            _commentsTable.Source          = _tableSource;
            _commentsTable.LayoutMargins   = UIEdgeInsets.Zero;
            _commentsTable.RegisterClassForCellReuse(typeof(DescriptionTableViewCell), nameof(DescriptionTableViewCell));
            _commentsTable.RegisterNibForCellReuse(UINib.FromName(nameof(DescriptionTableViewCell), NSBundle.MainBundle), nameof(DescriptionTableViewCell));
            _commentsTable.RegisterClassForCellReuse(typeof(CommentTableViewCell), nameof(CommentTableViewCell));

            _commentsTable.RowHeight          = UITableView.AutomaticDimension;
            _commentsTable.EstimatedRowHeight = 150f;

            Offset     = 0;
            Activeview = _commentView;

            if (Post.Children == 0)
            {
                OpenKeyboard();
            }

            SetPlaceholder();
            SetBackButton();
            GetComments();
        }
コード例 #3
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            commentTextView.Layer.BorderColor  = Helpers.Constants.R244G244B246.CGColor;
            commentTextView.Layer.BorderWidth  = 1f;
            commentTextView.Layer.CornerRadius = 20f;
            commentTextView.TextContainerInset = new UIEdgeInsets(10, 20, 10, 15);
            commentTextView.Font      = Helpers.Constants.Regular14;
            _commentsTextViewDelegate = new CommentsTextViewDelegate();
            commentTextView.Delegate  = _commentsTextViewDelegate;

            sendButton.Layer.BorderColor  = Helpers.Constants.R244G244B246.CGColor;
            sendButton.Layer.BorderWidth  = 1f;
            sendButton.Layer.CornerRadius = sendButton.Frame.Width / 2;
            sendButton.TouchDown         += CreateComment;

            _tableSource             = new CommentsTableViewSource(_presenter, Post);
            _tableSource.CellAction += CellAction;
            _tableSource.TagAction  += TagAction;

            commentsTable.Bounces       = false;
            commentsTable.Source        = _tableSource;
            commentsTable.LayoutMargins = UIEdgeInsets.Zero;
            commentsTable.RegisterClassForCellReuse(typeof(DescriptionTableViewCell), nameof(DescriptionTableViewCell));
            commentsTable.RegisterNibForCellReuse(UINib.FromName(nameof(DescriptionTableViewCell), NSBundle.MainBundle), nameof(DescriptionTableViewCell));
            commentsTable.RegisterClassForCellReuse(typeof(CommentTableViewCell), nameof(CommentTableViewCell));
            commentsTable.RegisterNibForCellReuse(UINib.FromName(nameof(CommentTableViewCell), NSBundle.MainBundle), nameof(CommentTableViewCell));

            commentsTable.RowHeight          = UITableView.AutomaticDimension;
            commentsTable.EstimatedRowHeight = 150f;

            Offset     = 0;
            Activeview = bottomView;

            if (Post.Children == 0)
            {
                OpenKeyboard();
            }

            SetPlaceholder();
            SetBackButton();
            GetComments();
        }