<!--
{
  "availability" : [
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFUserNotificationPopUpSelection(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@F@CFUserNotificationPopUpSelection"
  },
  "title" : "CFUserNotificationPopUpSelection(_:)"
}
-->

# CFUserNotificationPopUpSelection(_:)

Returns a flag used to set the selected element of a pop-up menu.

```
func CFUserNotificationPopUpSelection(_ n: CFIndex) -> CFOptionFlags
```

## Parameters

`n`

The index of the pop-up menu element to select. The index corresponds to the order in which the pop-up menu elements are listed in the [`kCFUserNotificationPopUpTitlesKey`](/documentation/CoreFoundation/kCFUserNotificationPopUpTitlesKey) array of the user notification’s description dictionary. `idx` must be in the range `0` to `255`.

## Return Value

A flag that can be used to set the selected element of a pop-up menu when creating a user notification with [`CFUserNotificationCreate(_:_:_:_:_:)`](/documentation/CoreFoundation/CFUserNotificationCreate(_:_:_:_:_:)).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)