public NavigationBar (NSCoder coder)
			: base (coder)
		{
			NotificationBar = new NotificationBar (coder);

			BarStyle = UIBarStyle.Black;
			BarTintColor = new UIColor (0.25f, 0.29f, 0.36f, 1);
			TintColor = UIColor.White;

			AddSubview (NotificationBar);

			var leftConstraint = NSLayoutConstraint.Create (this, Leading, Equal, NotificationBar, Leading, 1, 0);
			AddConstraint (leftConstraint);

			var rightConstraint = NSLayoutConstraint.Create (this, Trailing, Equal, NotificationBar, Trailing, 1, 0);
			AddConstraint (rightConstraint);

			var topConstraint = NSLayoutConstraint.Create (this, Top, Equal, NotificationBar, Top, 1, 0);
			AddConstraint (topConstraint);
		}
示例#2
0
        public NavigationBar(NSCoder coder)
            : base(coder)
        {
            NotificationBar = new NotificationBar(coder);

            BarStyle     = UIBarStyle.Black;
            BarTintColor = new UIColor(0.25f, 0.29f, 0.36f, 1);
            TintColor    = UIColor.White;

            AddSubview(NotificationBar);

            var leftConstraint = NSLayoutConstraint.Create(this, Leading, Equal, NotificationBar, Leading, 1, 0);

            AddConstraint(leftConstraint);

            var rightConstraint = NSLayoutConstraint.Create(this, Trailing, Equal, NotificationBar, Trailing, 1, 0);

            AddConstraint(rightConstraint);

            var topConstraint = NSLayoutConstraint.Create(this, Top, Equal, NotificationBar, Top, 1, 0);

            AddConstraint(topConstraint);
        }