private void ConfigureView() { LoadingAnimation(true); _sendButton.Enabled = false; _textView.Delegate = this; _tableView.SectionHeaderHeight = 0; _tableView.TableHeaderView = new UIView(new CGRect(0, 0, 0, 0.1f)); _keyboardViewBottomConstraint.Constant = _keyboardBottomHeight; _tableViewBottomConstraint.Constant = _keyboardAreaView.Frame.Height + _keyboardBottomHeight; AddStatusInTableView(); _tableViewTapGesture.AddTarget(HandleTableDragGesture); _tableViewSwipeGesture.AddTarget(HandleTableDragGesture); _tableScrollView = _tableView as UIScrollView; _tableView.SeparatorStyle = UITableViewCellSeparatorStyle.None; _tableView.BackgroundColor = Colors.White; _imageView1.Image?.Dispose(); _imageView2.Image?.Dispose(); _imageView3.Image?.Dispose(); _imageView1.Image = UIImage.FromBundle("keyboard"); _imageView2.Image = UIImage.FromBundle("image_picker"); _imageView3.Image = UIImage.FromBundle("files"); _keyboardAreaView.BackgroundColor = Colors.KeyboardView; _fakeAreaView.BackgroundColor = Colors.KeyboardView; _textView.EnablesReturnKeyAutomatically = true; _textView.TextContainerInset = new UIEdgeInsets(10, 10, 10, 10); _textView.TextColor = Colors.Black; _textView.Font = UIFont.SystemFontOfSize(14f); _textView.Text = string.Empty; CustomUIExtensions.CornerView(_sendView, 2); UILabelExtensions.SetupLabelAppearance(_sendLabel, ViewModel.SendMessageButton, Colors.ProfileGray, 15f, UIFontWeight.Medium); UILabelExtensions.SetupLabelAppearance(_placeholderLabel, ViewModel.TypeSomething, Colors.ProfileGrayDarker, 14f); _sendView.BackgroundColor = UIColor.Clear; _button1.TouchUpInside -= OnButton1_TouchUpInside; _button1.TouchUpInside += OnButton1_TouchUpInside; _button2.TouchUpInside -= OnButton2_TouchUpInside; _button2.TouchUpInside += OnButton2_TouchUpInside; _button3.TouchUpInside -= OnButton3_TouchUpInside; _button3.TouchUpInside += OnButton3_TouchUpInside; _sendButton.TouchUpInside -= OnSendButton_TouchUpInside; _sendButton.TouchUpInside += OnSendButton_TouchUpInside; }
public override void ViewDidLoad() { base.ViewDidLoad(); _backgroundImage.Image?.Dispose(); _profileImage.Image?.Dispose(); this.View.Alpha = 0.3f; this.View.BackgroundColor = Colors.Black30; _backgroundView.Layer.CornerRadius = 2f; _buttonView.Layer.CornerRadius = 2f; _backgroundImage.Layer.CornerRadius = 2f; CustomUIExtensions.ViewShadow(_backgroundView); _buttonView.BackgroundColor = Colors.MainBlue; UIButtonExtensions.SetupButtonAppearance(_button, Colors.White, 17f, _resources[_resources.Length - 1]); _nameLabel.AttributedText = new NSAttributedString(_name, font: UIFont.BoldSystemFontOfSize(16), foregroundColor: Colors.White, shadow: CustomUIExtensions.TextShadow()); if (!string.IsNullOrEmpty(_photo)) { ImageService.Instance.LoadStream((token) => { return(ImageHelper.GetStreamFromImageByte(token, _photo)); }).ErrorPlaceholder("letter_round_big", ImageSource.CompiledResource).Transform(new BlurredTransformation(25f)).Into(_backgroundImage); ImageService.Instance.LoadStream((token) => { return(ImageHelper.GetStreamFromImageByte(token, _photo)); }).ErrorPlaceholder("letter_round_big", ImageSource.CompiledResource).Transform(new RoundedTransformation(30)).Into(_profileImage); } else { _backgroundImage.BackgroundColor = Colors.MainBlue; _profileImage.Image = UIImage.FromBundle("letter_curved"); CustomUIExtensions.CornerView(_profileImage, 3); } _backgroundImage.ContentMode = UIViewContentMode.ScaleToFill; _button.TouchUpInside -= OnCloseButton_TouchUpInside; _button.TouchUpInside += OnCloseButton_TouchUpInside; SetupTableView(); }