Пример #1
0
        public static OnboardingContentView ContentViewOnView(UIView view, IOnboardingContentViewDelegate delegateView, int itemCounts, nfloat bottomConstraints)
        {
            var contentView = new OnboardingContentView(itemCounts, delegateView);

            contentView.BackgroundColor = UIColor.Clear;
            contentView.TranslatesAutoresizingMaskIntoConstraints = false;

            view.AddSubview(contentView);

            //Add constraints
            (view, contentView).ConstraintOps((obj) => obj.Attribute = NSLayoutAttribute.Left);
            (view, contentView).ConstraintOps((obj) => obj.Attribute = NSLayoutAttribute.Right);
            (view, contentView).ConstraintOps((obj) => obj.Attribute = NSLayoutAttribute.Top);
            (view, contentView).ConstraintOps((obj) =>
            {
                obj.Attribute = NSLayoutAttribute.Bottom;
                obj.Constant  = bottomConstraints;
            });

            return(contentView);
        }
Пример #2
0
 public OnboardingContentView(int itemCounts, IOnboardingContentViewDelegate onboardDelegate)
 {
     _delegate  = onboardDelegate;
     this.Frame = CoreGraphics.CGRect.Empty;
     Initialize();
 }