---
metadata:
  - name: generator
    content: Diplodoc Platform v5.70.0
alternate:
  - https://appmetrica.yandex.by/docs/en/sdk/ios/analytics/swift/GenderAttribute.md
  - https://appmetrica.yandex.by/docs/ru/sdk/ios/analytics/swift/GenderAttribute.md
  - https://appmetrica.yandex.by/docs/zh/sdk/ios/analytics/swift/GenderAttribute.md
  - href: https://appmetrica.yandex.by/docs/zh/sdk/ios/analytics/swift/GenderAttribute.md
    type: text/markdown
    title: Markdown version
  - href: https://appmetrica.yandex.by/docs/zh/llms.txt?revision=r22089357
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://appmetrica.yandex.by/docs/zh/llms.txt?revision=r22089357

# GenderAttribute 协议

该协议定义了更新用户个人资料性别的方法。

## Instance methods {#instance_summary}

#|
|| [withValue(_:)](#method_withValue) | 用 [GenderType](https://appmetrica.yandex.by/docs/zh/sdk/ios/analytics/swift/GenderType.md) 枚举中指定的值更新属性值。 ||
|| [withValueReset()](#method_withValueReset) | 重置属性值。 ||
|#

## Method descriptions {#method_detail}

### withValue(_:) {#method_withValue}

```swift translate=no
func withValue(_ value: GenderType) -> UserProfileUpdate
```

用 [GenderType](https://appmetrica.yandex.by/docs/zh/sdk/ios/analytics/swift/GenderType.md) 枚举中指定的值更新属性值。

**参数：**

#|
|| `value` | 来自 [GenderType](https://appmetrica.yandex.by/docs/zh/sdk/ios/analytics/swift/GenderType.md) 枚举的值。 ||
|#

**返回：**

The `用户配置更新` 类实例。

### withValueReset() {#method_withValueReset}

```swift translate=no
func withValueReset() -> UserProfileUpdate
```

重置属性值。

**返回：**

The `用户配置更新` 类实例。
