public override void ViewDidLoad() { base.ViewDidLoad(); this.View.Alpha = 0.3f; this.View.BackgroundColor = Colors.Black30; _backgroundView.Layer.CornerRadius = 2f; CustomUIExtensions.ViewShadow(_backgroundView); _viewButton.Layer.CornerRadius = 2f; switch (_inputType) { case QuestionType.Good: _viewButtonSmall.BackgroundColor = Colors.Green; _viewButton.BackgroundColor = Colors.Green; break; case QuestionType.Bad: _viewButtonSmall.BackgroundColor = Colors.Red; _viewButton.BackgroundColor = Colors.Red; break; case QuestionType.Normal: _viewButtonSmall.BackgroundColor = Colors.MainBlue; _viewButton.BackgroundColor = Colors.MainBlue; break; default: _viewButtonSmall.BackgroundColor = Colors.MainBlue; _viewButton.BackgroundColor = Colors.MainBlue; break; } UILabelExtensions.SetupLabelAppearance(_label, _text, Colors.Black, 20f, UIFontWeight.Medium); UIButtonExtensions.SetupButtonAppearance(_submitButton, Colors.White, 17f, _button); _closeButton.SetImage(UIImage.FromBundle("close_black"), UIControlState.Normal); _closeButton.ContentMode = UIViewContentMode.ScaleAspectFit; _closeButton.TintColor = Colors.Black; _submitButton.TouchUpInside -= OnSubmitButton_TouchUpInside; _submitButton.TouchUpInside += OnSubmitButton_TouchUpInside; _closeButton.TouchUpInside -= OnCloseButton_TouchUpInside; _closeButton.TouchUpInside += OnCloseButton_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(); }
public override void ViewDidLoad() { base.ViewDidLoad(); this.View.Alpha = 0.3f; this.View.BackgroundColor = Colors.Black30; _backgroundView.Layer.CornerRadius = 2f; _buttonView.Layer.CornerRadius = 2f; CustomUIExtensions.ViewShadow(_backgroundView); UILabelExtensions.SetupLabelAppearance(_titleLabel, _title, Colors.Black, 24f, UIFontWeight.Medium); UILabelExtensions.SetupLabelAppearance(_label1, _text1, Colors.GrayLabel, 14f); UILabelExtensions.SetupLabelAppearance(_label2, _text2, Colors.GrayLabel, 14f); UILabelExtensions.SetupLabelAppearance(_label3, _text3, Colors.GrayLabel, 14f); CustomUIExtensions.RoundView(_dotview1); CustomUIExtensions.RoundView(_dotview2); CustomUIExtensions.RoundView(_dotview3); if (string.IsNullOrEmpty(_text2)) { _dotview2.Hidden = true; _label2.Hidden = true; } if (string.IsNullOrEmpty(_text3)) { _dotview3.Hidden = true; _label3.Hidden = true; } UIButtonExtensions.SetupButtonAppearance(_submitButton, Colors.White, 17f, _confirmButtonText); _closeButton.SetImage(UIImage.FromBundle("close_black"), UIControlState.Normal); _closeButton.ContentMode = UIViewContentMode.ScaleAspectFit; _closeButton.TintColor = Colors.Black; _closeButton.TouchUpInside -= OnCloseButton_TouchUpInside; _closeButton.TouchUpInside += OnCloseButton_TouchUpInside; _submitButton.TouchUpInside -= OnSubmitButton_TouchUpInside; _submitButton.TouchUpInside += OnSubmitButton_TouchUpInside; }
public override void ViewDidLoad() { base.ViewDidLoad(); this.View.Alpha = 0.3f; this.View.BackgroundColor = Colors.Black30; _backgroundView.Layer.CornerRadius = 2f; CustomUIExtensions.ViewShadow(_backgroundView); UILabelExtensions.SetupLabelAppearance(_titleLabel, _locationResources["Title"], Colors.Black, 20f, UIFontWeight.Semibold); _image1.Image = UIImage.FromBundle("letter_curved"); UILabelExtensions.SetupLabelAppearance(_title1, _locationResources["TitleLetter"], Colors.Black, 18f, UIFontWeight.Medium); UILabelExtensions.SetupLabelAppearance(_description1, _locationResources["DescriptionLetter"], Colors.DescriptionCall, 11f); _image2.Image = UIImage.FromBundle("call_cellular"); UILabelExtensions.SetupLabelAppearance(_title2, _locationResources["TitlePhone"], Colors.Black, 18f, UIFontWeight.Medium); UILabelExtensions.SetupLabelAppearance(_description2, _locationResources["DescriptionPhone"], Colors.DescriptionCall, 11f); _closeButton.SetImage(UIImage.FromBundle("close_black"), UIControlState.Normal); _closeButton.ContentMode = UIViewContentMode.ScaleAspectFit; _closeButton.TintColor = Colors.Black; _separatorView.BackgroundColor = Colors.AlertDividerColor; _button1.TouchUpInside -= OnButton1_TouchUpInside; _button1.TouchUpInside += OnButton1_TouchUpInside; if (_showPhoneOption) { _button2.TouchUpInside -= OnButton2_TouchUpInside; _button2.TouchUpInside += OnButton2_TouchUpInside; } else { _hideButtonView.Hidden = false; _hideButtonView.Alpha = 0.6f; } _closeButton.TouchUpInside -= OnCloseButton_TouchUpInside; _closeButton.TouchUpInside += OnCloseButton_TouchUpInside; }
public override void ViewDidLoad() { base.ViewDidLoad(); this.View.Alpha = 0.3f; this.View.BackgroundColor = Colors.Black30; _backgroundView.Layer.CornerRadius = 2f; CustomUIExtensions.ViewShadow(_backgroundView); _separatorView.BackgroundColor = Colors.AlertDividerColor; UILabelExtensions.SetupLabelAppearance(_titleLabel, _title, Colors.Black, 18f, UIFontWeight.Medium); _closeButton.SetImage(UIImage.FromBundle("close_black"), UIControlState.Normal); _closeButton.ContentMode = UIViewContentMode.ScaleAspectFit; _closeButton.TintColor = Colors.Black; _closeButton.TouchUpInside -= OnCloseButton_TouchUpInside; _closeButton.TouchUpInside += OnCloseButton_TouchUpInside; SetupTableView(); }
public override void ViewDidLoad() { base.ViewDidLoad(); this.View.Alpha = 0.3f; this.View.BackgroundColor = Colors.Black30; _backGroundView.Layer.CornerRadius = 2f; _buttonColorBig.Layer.CornerRadius = 2f; CustomUIExtensions.ViewShadow(_backGroundView); UILabelExtensions.SetupLabelAppearance(_titleLabel, _title, Colors.Black, 24f, UIFontWeight.Medium); UILabelExtensions.SetupLabelAppearance(_filterByNameLabel, _filters[0].Title, Colors.Black, 14f); UILabelExtensions.SetupLabelAppearance(_filterByNameDescription, _filters[0].Description, Colors.GrayLabel, 12f); UILabelExtensions.SetupLabelAppearance(_switchLabel, _filters[1].Title, Colors.Black, 14f); UILabelExtensions.SetupLabelAppearance(_descriptionLabel, _filters[1].Description, Colors.GrayLabel, 12f); _buttonColorBig.BackgroundColor = Colors.MainBlue; _buttonColorSmall.BackgroundColor = Colors.MainBlue; UIButtonExtensions.SetupButtonAppearance(_button, Colors.White, 17f, _buttonText); _closeButton.SetImage(UIImage.FromBundle("close_black"), UIControlState.Normal); _closeButton.ContentMode = UIViewContentMode.ScaleAspectFit; _closeButton.TintColor = Colors.Black; _filterByNameSwitch.On = _filters[0].IsActive; _switch.On = _filters[1].IsActive; _closeButton.TouchUpInside -= OnCloseButton_TouchUpInside; _closeButton.TouchUpInside += OnCloseButton_TouchUpInside; _button.TouchUpInside -= OnSubmitButton_TouchUpInside; _button.TouchUpInside += OnSubmitButton_TouchUpInside; }
public override void ViewDidLoad() { base.ViewDidLoad(); DismissKeyboardOnBackgroundTap(); this.View.Alpha = 0.3f; if (_questionType == QuestionType.Bad) { _buttonView1.BackgroundColor = Colors.Red; _buttonView2.BackgroundColor = Colors.Red; UILabelExtensions.SetupLabelAppearance(_subtitleLabel, _subtitle, Colors.Red, 30, UIFontWeight.Bold); } else { _buttonView1.BackgroundColor = Colors.MainBlue; _buttonView2.BackgroundColor = Colors.MainBlue; UILabelExtensions.SetupLabelAppearance(_subtitleLabel, _subtitle, Colors.SomeBlue, 30, UIFontWeight.Bold); } switch (_inputType) { case InputType.Email: _textField.KeyboardType = UIKeyboardType.EmailAddress; break; case InputType.Number: _textField.KeyboardType = UIKeyboardType.NumberPad; break; case InputType.Phone: _textField.KeyboardType = UIKeyboardType.PhonePad; break; case InputType.Password: _textField.SecureTextEntry = true; break; default: _textField.KeyboardType = UIKeyboardType.Default; break; } _textField.AutocorrectionType = UITextAutocorrectionType.No; if (string.IsNullOrEmpty(_subtitle)) { _subtitleLabel.Text = string.Empty; _subtitleLabel.Hidden = true; _subtitleLabel.Frame = new CGRect(); _subtitleHeightConstraint.Constant = 0; } this.View.BackgroundColor = Colors.Black30; _backgroundView.Layer.CornerRadius = 2f; _buttonView.Layer.CornerRadius = 2f; CustomUIExtensions.ViewShadow(_backgroundView); UILabelExtensions.SetupLabelAppearance(_titleLabel, _title, Colors.Black, 18); UITextFieldExtensions.SetupField(this.View, 0, _hint, _textField, _indicatorView, _textFieldHeightConstraint, _indicatorLabel); UIButtonExtensions.SetupButtonAppearance(_confirmButton, Colors.White, 17f, _confirmButtonText); if (!string.IsNullOrEmpty(_inputContent)) { _textField.Text = _inputContent; _indicatorLabel.Alpha = 1; } _closeButton.SetImage(UIImage.FromBundle("close_black"), UIControlState.Normal); _closeButton.ContentMode = UIViewContentMode.ScaleAspectFit; _closeButton.TintColor = Colors.Black; _closeButton.TouchUpInside -= OnCloseButton_TouchUpInside; _closeButton.TouchUpInside += OnCloseButton_TouchUpInside; _confirmButton.TouchUpInside -= OnConfirmButton_TouchUpInside; _confirmButton.TouchUpInside += OnConfirmButton_TouchUpInside; }