---
title: "init(interactionBehavior:interactionEffect:activationHandler:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/uispringloadedinteraction/init(interactionbehavior:interactioneffect:activationhandler:)"
---

# init(interactionBehavior:interactionEffect:activationHandler:)

Initializes a new spring-loaded interaction with a specific behavior, visual effect, and activation handler block.

## Declaration

```swift
init(interactionBehavior: (any UISpringLoadedInteractionBehavior)?, interactionEffect: (any UISpringLoadedInteractionEffect)?, activationHandler handler: @escaping (UISpringLoadedInteraction, any UISpringLoadedInteractionContext) -> Void)
```

## Parameters

- `interactionBehavior`: The interaction behavior object controlling the spring-loaded interaction activation. If the value is nil, the default behavior is used.
- `interactionEffect`: The interaction effect object styling the interaction’s view. If the value is nil, the default effect is used.
- `handler`: The handler that is invoked when the spring-loaded interaction is activated.

## Return Value

Return Value A spring-loaded interaction that has a specific behavior, visual effect, and activation handler block.

## See Also

### Initializing a spring-loaded interaction

- [init(activationHandler:)](uikit/uispringloadedinteraction/init(activationhandler:).md)
