Exemplo n.º 1
0
        private void AddProfileViews()
        {
            _photo = new UIImageView {
                IsAccessibilityElement = true,
                AccessibilityLabel     = "Profile photo".LocalizedString("Accessibility label for profile photo"),
                TranslatesAutoresizingMaskIntoConstraints = false,
            };
            AddSubview(_photo);

            _ageTitleLabel      = StyleUtilities.CreateStandardLabel();
            _ageTitleLabel.Text = "Age".LocalizedString("Age of the user");
            AddSubview(_ageTitleLabel);

            _ageValueLabel = StyleUtilities.CreateDetailLabel();
            AddSubview(_ageValueLabel);

            _hobbiesTitleLabel      = StyleUtilities.CreateStandardLabel();
            _hobbiesTitleLabel.Text = "Hobbies".LocalizedString("The user's hobbies");
            AddSubview(_hobbiesTitleLabel);

            _hobbiesValueLabel = StyleUtilities.CreateDetailLabel();
            AddSubview(_hobbiesValueLabel);

            _elevatorPitchTitleLabel      = StyleUtilities.CreateStandardLabel();
            _elevatorPitchTitleLabel.Text = "Elevator Pitch".LocalizedString("The user's elevator pitch for finding a partner");
            AddSubview(_elevatorPitchTitleLabel);

            _elevatorPitchValueLabel = StyleUtilities.CreateDetailLabel();
            AddSubview(_elevatorPitchValueLabel);

            this.SetAccessibilityElements(NSArray.FromNSObjects(
                                              _photo,
                                              _ageTitleLabel,
                                              _ageValueLabel,
                                              _hobbiesTitleLabel,
                                              _hobbiesValueLabel,
                                              _elevatorPitchTitleLabel,
                                              _elevatorPitchValueLabel
                                              ));
        }