Esempio n. 1
0
        private void setupNavigationBar()
        {
            //Back button title
            var attributes = new UITextAttributes
            {
                Font      = UIFont.SystemFontOfSize(14, UIFontWeight.Medium),
                TextColor = Colors.NavigationBar.BackButton.ToNativeColor()
            };

            UIBarButtonItem.Appearance.SetTitleTextAttributes(attributes, UIControlState.Normal);
            UIBarButtonItem.Appearance.SetTitleTextAttributes(attributes, UIControlState.Highlighted);
            UIBarButtonItem.Appearance.SetBackButtonTitlePositionAdjustment(new UIOffset(6, 0), UIBarMetrics.Default);

            //Back button icon
            var image = UIImage.FromBundle("icBackNoPadding");

            UINavigationBar.Appearance.BackIndicatorImage = image;
            UINavigationBar.Appearance.BackIndicatorTransitionMaskImage = image;

            //Title and background
            var barBackgroundColor = Colors.NavigationBar.BackgroundColor.ToNativeColor();

            UINavigationBar.Appearance.ShadowImage     = new UIImage();
            UINavigationBar.Appearance.BarTintColor    = barBackgroundColor;
            UINavigationBar.Appearance.BackgroundColor = barBackgroundColor;
            UINavigationBar.Appearance.TintColor       = Colors.NavigationBar.BackButton.ToNativeColor();
            UINavigationBar.Appearance.SetBackgroundImage(ImageExtension.ImageWithColor(barBackgroundColor), UIBarMetrics.Default);
            UINavigationBar.Appearance.TitleTextAttributes = new UIStringAttributes
            {
                Font            = UIFont.SystemFontOfSize(14, UIFontWeight.Medium),
                ForegroundColor = UIColor.Black
            };
        }
Esempio n. 2
0
        private void setupAppearance()
        {
            NavigationBar.ShadowImage     = new UIImage();
            NavigationBar.BarTintColor    = barBackgroundColor;
            NavigationBar.BackgroundColor = barBackgroundColor;
            NavigationBar.TintColor       = ColorAssets.Text2;
            NavigationBar.SetBackgroundImage(ImageExtension.ImageWithColor(barBackgroundColor), UIBarMetrics.Default);

            NavigationBar.TitleTextAttributes = titleTextAttributes;

            var image = UIImage.FromBundle("icBackNoPadding");

            NavigationBar.BackIndicatorImage = image;
            NavigationBar.BackIndicatorTransitionMaskImage = image;
        }
Esempio n. 3
0
 private void setupAppearance()
 {
     TabBar.BackgroundImage             = ImageExtension.ImageWithColor(ColorAssets.Background);
     TabBar.SelectedImageTintColor      = Colors.TabBar.SelectedImageTintColor.ToNativeColor();
     TabBarItem.TitlePositionAdjustment = new UIOffset(0, 200);
 }