---
title: "method_setImplementation(_:_:)"
framework: Objective-C Runtime
role: symbol
role_heading: Function
platforms: [iOS 2.0+, iPadOS 2.0+, Mac Catalyst 13.1+, macOS 10.5+, tvOS 9.0+, visionOS 1.0+, watchOS 1.0+]
path: "objectivec/method_setimplementation(_:_:)"
---

# method_setImplementation(_:_:)

Sets the implementation of a method.

## Declaration

```swift
func method_setImplementation(_ m: Method, _ imp: IMP) -> IMP
```

## Return Value

Return Value The previous implementation of the method.

## See Also

### Working with Methods

- [method_getName(_:)](objectivec/method_getname(_:).md)
- [method_getImplementation(_:)](objectivec/method_getimplementation(_:).md)
- [method_getTypeEncoding(_:)](objectivec/method_gettypeencoding(_:).md)
- [method_copyReturnType(_:)](objectivec/method_copyreturntype(_:).md)
- [method_copyArgumentType(_:_:)](objectivec/method_copyargumenttype(_:_:).md)
- [method_getReturnType(_:_:_:)](objectivec/method_getreturntype(_:_:_:).md)
- [method_getNumberOfArguments(_:)](objectivec/method_getnumberofarguments(_:).md)
- [method_getArgumentType(_:_:_:_:)](objectivec/method_getargumenttype(_:_:_:_:).md)
- [method_getDescription(_:)](objectivec/method_getdescription(_:).md)
- [method_exchangeImplementations(_:_:)](objectivec/method_exchangeimplementations(_:_:).md)
