<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "ObjectiveC",
  "identifier" : "/documentation/ObjectiveC/SEL",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "Objective-C Runtime"
    ],
    "preciseIdentifier" : "c:@T@SEL"
  },
  "title" : "SEL"
}
-->

# SEL

Defines an opaque type that represents a method selector.

```
typedef struct objc_selector * SEL;
```

## Discussion

Method selectors are used to represent the name of a method at runtime. A method selector is a C string that has been registered (or “mapped”) with the Objective-C runtime. Selectors generated by the compiler are automatically mapped by the runtime when the class is loaded.

You can add new selectors at runtime and retrieve existing selectors using the function [`sel_registerName(_:)`](/documentation/ObjectiveC/sel_registerName(_:)).

When using selectors, you must use the value returned from [`sel_registerName(_:)`](/documentation/ObjectiveC/sel_registerName(_:)) or the Objective-C compiler directive `@selector()`. You cannot simply cast a C string to `SEL`.

---

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)