CameraViewController.Views.PermissionsView.AwakeFromNib C# (CSharp) Method

AwakeFromNib() public method

public AwakeFromNib ( ) : void
return void
		public override void AwakeFromNib()
		{
			base.AwakeFromNib();

			BackgroundColor = UIColor.White;

			if (FontName == "")
			{
				FontName = "AppleSDGothicNeo-Regular";
			}

			titleLabel.TextColor = UIColor.White;
			titleLabel.Lines = 0;
			titleLabel.TextAlignment = UITextAlignment.Center;
			titleLabel.Font = UIFont.FromName(FontName, 22);
			titleLabel.Text = Helpers.Strings.PermissionsTitle;

			descriptionLabel.TextColor = UIColor.LightGray;
			descriptionLabel.Lines = 0;
			descriptionLabel.TextAlignment = UITextAlignment.Center;
			descriptionLabel.Font = UIFont.FromName(FontName, 16);

			var icon = UIImage.FromFile("permissionIcon.png");
			iconView.Image = icon;

			settingsButton.ContentEdgeInsets = new UIEdgeInsets(6, 12, 6, 12);
			settingsButton.SetTitle("Settings", UIControlState.Normal);
			settingsButton.SetTitleColor(UIColor.White, UIControlState.Normal);
			settingsButton.Layer.CornerRadius = 4;
			settingsButton.TitleLabel.Font = UIFont.FromName(FontName, 14);
			settingsButton.BackgroundColor = UIColor.FromRGBA(52 / 255, 183 / 255, 250 / 255, 1);
			settingsButton.TouchUpInside += delegate {OpenSettings();};

			AddSubview(iconView);
			AddSubview(titleLabel);
			AddSubview(descriptionLabel);
			AddSubview(settingsButton);

		}