Exemple #1
0
        public override void LoadView()
        {
            View = new UIView();
            var image        = new UIImageView(UIImage.FromBundle("images/onboarding/make-good-things-happen.png"));
            var headingLabel = new UILabel
            {
                Text          = "Make good\nthings happen",
                TextColor     = IOSTheme.JGLightPink,
                Font          = IOSTheme.ThemeFontLight(36),
                Lines         = 2,
                TextAlignment = UITextAlignment.Center
            };

            View.Add(image);
            View.Add(headingLabel);

            View.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();
            View.AddConstraints(
                image.AtTopOf(View),
                image.AtBottomOf(View),
                image.AtLeftOf(View),
                image.AtRightOf(View),

                headingLabel.AtTopOf(View, UIScreen.MainScreen.Bounds.Height * 0.20f),
                headingLabel.WithSameCenterX(View)
                );
        }
Exemple #2
0
        public override void LoadView()
        {
            View = new UIView();
            var image       = new UIImageView(UIImage.FromBundle("images/onboarding/discover.png"));
            var headingText = new UILabel
            {
                Text          = "Discover",
                TextColor     = UIColor.White,
                Font          = IOSTheme.ThemeFontLight(36),
                TextAlignment = UITextAlignment.Center
            };

            var descriptionText = new UILabel
            {
                Text          = "See stories from the people and\ncharities you care about",
                Lines         = 2,
                TextColor     = UIColor.White,
                Font          = IOSTheme.ThemeFontRegular(16),
                TextAlignment = UITextAlignment.Center
            };

            View.Add(image);
            View.Add(headingText);
            View.Add(descriptionText);

            View.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();
            View.AddConstraints(
                image.AtTopOf(View),
                image.AtBottomOf(View),
                image.AtLeftOf(View),
                image.AtRightOf(View),

                headingText.AtTopOf(View, 25),
                headingText.WithSameCenterX(View),

                descriptionText.WithSameCenterX(View),
                descriptionText.AtTopOf(View, UIScreen.MainScreen.Bounds.Height * 0.78f)
                );
        }
        public override void LoadView()
        {
            View = new UIView();
            var image       = new UIImageView(UIImage.FromBundle("images/onboarding/fundraise.png"));
            var headingText = new UILabel
            {
                Text          = "Fundraise",
                TextColor     = UIColor.White,
                Font          = IOSTheme.ThemeFontLight(36),
                TextAlignment = UITextAlignment.Center
            };

            var descriptionText = new UILabel
            {
                Text          = "Raise money for charity or your\nown personal cause",
                Lines         = 2,
                TextColor     = UIColor.White,
                Font          = IOSTheme.ThemeFontRegular(16),
                TextAlignment = UITextAlignment.Center
            };

            View.Add(image);
            View.Add(headingText);
            View.Add(descriptionText);

            View.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();
            View.AddConstraints(
                image.AtTopOf(View),
                image.AtBottomOf(View),
                image.AtLeftOf(View),
                image.AtRightOf(View),

                headingText.AtTopOf(View, 25),
                headingText.WithSameCenterX(View),

                descriptionText.WithSameCenterX(View),
                descriptionText.AtTopOf(View, UIScreen.MainScreen.Bounds.Height * 0.78f)
                );
        }
        public override void LoadView()
        {
            View = new UIView();
            var image       = new UIImageView(UIImage.FromBundle("images/onboarding/connect.png"));
            var headingText = new UILabel
            {
                Text          = "Connect",
                TextColor     = UIColor.White,
                Font          = IOSTheme.ThemeFontLight(36),
                TextAlignment = UITextAlignment.Center
            };

            var descriptionText = new UILabel
            {
                Text          = "Join the world's largest giving\ncommunity and reach more people",
                Lines         = 2,
                TextColor     = UIColor.White,
                Font          = IOSTheme.ThemeFontRegular(16),
                TextAlignment = UITextAlignment.Center
            };

            View.Add(image);
            View.Add(headingText);
            View.Add(descriptionText);

            View.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();
            View.AddConstraints(
                image.AtTopOf(View),
                image.AtBottomOf(View),
                image.AtLeftOf(View),
                image.AtRightOf(View),

                headingText.AtTopOf(View, 25),
                headingText.WithSameCenterX(View),

                descriptionText.WithSameCenterX(View),
                descriptionText.AtTopOf(View, UIScreen.MainScreen.Bounds.Height * 0.78f)
                );
        }
        public override void LoadView()
        {
            View = new UIView();

            var img   = UIImage.FromBundle("images/onboarding/get-started.png");
            var image = new UIImageView(img);

            BackGroundImageForLogin = img;

            _headingText = new UILabel
            {
                Text          = "Get started",
                TextColor     = UIColor.White,
                Font          = IOSTheme.ThemeFontLight(36),
                TextAlignment = UITextAlignment.Center
            };

            _subHeadingText = new UILabel
            {
                Text          = "Log in or sign up",
                TextColor     = UIColor.White,
                Font          = IOSTheme.ThemeFontRegular(18),
                TextAlignment = UITextAlignment.Center
            };



            _loginButton = new UIButton();
            _loginButton.SetTitle("Log in", UIControlState.Normal);
            _loginButton.SetTitleColor(UIColor.White, UIControlState.Normal);
            _loginButton.Font = IOSTheme.ThemeFontBold(18);
            _loginButton.Layer.BorderWidth  = 1;
            _loginButton.Layer.BorderColor  = UIColor.White.CGColor;
            _loginButton.Layer.CornerRadius = 2;
            _loginButton.AccessibilityLabel = "LoginButton";

            _loginActivityIndicator = new UIActivityIndicatorView {
                HidesWhenStopped = true
            };
            _signupActivityIndicator = new UIActivityIndicatorView {
                HidesWhenStopped = true
            };

            _signupButton = new UIButton();
            _signupButton.SetTitle("Sign up", UIControlState.Normal);
            _signupButton.SetTitleColor(UIColor.White, UIControlState.Normal);
            _signupButton.Font = IOSTheme.ThemeFontBold(18);
            _signupButton.Layer.BorderWidth  = 1;
            _signupButton.Layer.BorderColor  = UIColor.White.CGColor;
            _signupButton.Layer.CornerRadius = 2;
            _signupButton.AccessibilityLabel = "signupButton";

            int termsAndConditionsFontSize = 11;
            var termsAndConditionsColour   = UIColor.White;

            _termsAndConditionsLabel = new UILabel {
                TextColor = termsAndConditionsColour, Font = IOSTheme.ThemeFontLight(termsAndConditionsFontSize), Lines = 0, TextAlignment = UITextAlignment.Center
            };
            var termsAndConditions = new NSMutableAttributedString("By continuing you are agreeing to our\n");

            termsAndConditions.Append(new NSAttributedString(" Terms of Service ", IOSTheme.ThemeFontRegular(termsAndConditionsFontSize), termsAndConditionsColour));
            termsAndConditions.Append(new NSAttributedString("and"));
            termsAndConditions.Append(new NSAttributedString(" Privacy Policy.", IOSTheme.ThemeFontRegular(termsAndConditionsFontSize), termsAndConditionsColour));
            _termsAndConditionsLabel.AttributedText         = termsAndConditions;
            _termsAndConditionsLabel.UserInteractionEnabled = true;

            View.Add(image);
            View.Add(_headingText);
            View.Add(_subHeadingText);
            View.Add(_loginButton);
            View.Add(_signupButton);
            View.Add(_termsAndConditionsLabel);
            View.Add(_loginActivityIndicator);
            View.Add(_signupActivityIndicator);

            View.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();

            View.AddConstraints(
                image.AtTopOf(View),
                image.AtBottomOf(View),
                image.AtLeftOf(View),
                image.AtRightOf(View),

                _headingText.AtTopOf(View, 65),
                _headingText.WithSameCenterX(View),

                _subHeadingText.Below(_headingText, 25),
                _subHeadingText.WithSameCenterX(View),


                _loginButton.WithSameCenterY(View).Plus(60),
                _loginButton.AtLeftOf(View, 24),
                _loginButton.AtRightOf(View, (UIScreen.MainScreen.Bounds.Width / 2.0f) + 10),
                _loginButton.Height().EqualTo(44),

                _loginActivityIndicator.WithSameCenterX(_loginButton),
                _loginActivityIndicator.WithSameCenterY(_loginButton),

                _signupButton.WithSameCenterY(_loginButton),
                _signupButton.AtLeftOf(View, (UIScreen.MainScreen.Bounds.Width / 2.0f) + 10),
                _signupButton.AtRightOf(View, 24),
                _signupButton.WithSameHeight(_loginButton),

                _signupActivityIndicator.WithSameCenterX(_signupButton),
                _signupActivityIndicator.WithSameCenterY(_signupButton),

                _termsAndConditionsLabel.WithSameCenterX(View),
                _termsAndConditionsLabel.AtBottomOf(View, 30)


                );

            View.BringSubviewToFront(_loginActivityIndicator);
            View.BringSubviewToFront(_signupActivityIndicator);


            if (NavigationController != null && NavigationController.NavigationBar.TopItem != null)
            {
                NavigationController.NavigationBar.TopItem.Title = @" ";
            }
        }