<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ObjectiveC",
  "identifier" : "/documentation/ObjectiveC/method_getNumberOfArguments(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Objective-C Runtime"
    ],
    "preciseIdentifier" : "c:@F@method_getNumberOfArguments"
  },
  "title" : "method_getNumberOfArguments(_:)"
}
-->

# method_getNumberOfArguments(_:)

Returns the number of arguments accepted by a method.

```
func method_getNumberOfArguments(_ m: Method) -> UInt32
```

## Parameters

`m`

A pointer to a [`Method`](/documentation/ObjectiveC/Method) data structure. Pass the method in question.

## Return Value

An integer containing the number of arguments accepted by the given method.

## Discussion

---

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)