Beispiel #1
0
        private static void ConfigureView()
        {
            UINavigationBar.Appearance.BarTintColor = Colors.BlueSetup;
            UINavigationBar.Appearance.SetTitleTextAttributes(new UITextAttributes()
            {
                TextColor = Colors.White
            });

            if (UIDevice.CurrentDevice.CheckSystemVersion(11, 0))
            {
                UINavigationBar.Appearance.LargeTitleTextAttributes = new UIStringAttributes {
                    ForegroundColor = Colors.White, Shadow = CustomUIExtensions.TextShadow()
                }
            }
            ;
        }
        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();
        }