Example #1
0
        private void Init()
        {
            if (_computedBackgroundColor == null)
            {
                var background = CellBackgroundView.CreateUIImage(44f);
                _computedBackgroundColor = UIColor.FromPatternImage(background);
                background.Dispose();
            }

            Font            = DefaultTitleFont;
            SubtitleFont    = DefaultDetailFont;
            BackgroundColor = _computedBackgroundColor;
            TextColor       = DefaultTitleColor;
            DetailColor     = DefaultDetailColor;
            LineBreakMode   = UILineBreakMode.TailTruncation;
            Lines           = 1;
        }
Example #2
0
        public override UITableViewCell GetCell(UITableView tv)
        {
            var cell = base.GetCell(tv);

            //Holy shit this is pathetic. This is a performance nightmare. However, I'm only using this in 1 place and it's
            //does not require a lot of power. For the love of god this needs to be removed.
            //All i want is pretty background without having to deal with the fact that putting backgroundview's cause overflow on the grouped cells
            var height = GetHeight(tv, null);

            if (height != _lastBackgroundComputedHeight)
            {
                var background = CellBackgroundView.CreateUIImage(height);
                BackgroundColor = UIColor.FromPatternImage(background);
                background.Dispose();
                _lastBackgroundComputedHeight = height;
            }

            return(cell);
        }