# present(product:step:from:)

> Opens the measuring / try-on window for a product, as a sheet over presenter (default: the app's top-most view controller).

Source: https://docs.tryyoursize.com/reference/ios/present/

*Method* · `TryYourSize (Swift)`

Opens the measuring / try-on window for a product, as a sheet over `presenter` (default: the app's top-most view controller).

Swiping the sheet down asks the window first: with unsaved measurements, the shopper confirms.

```swift
public func present(product: String, step: OpenStep? = nil, from presenter: UIViewController? = nil)
```

## Parameters

- **`product`** (`String`, required): Your product ID or SKU.
- **`step`** (`OpenStep?`, optional, default `nil`): `.create`, `.improve` or `.view` (default: where the shopper is).
- **`from`** (`UIViewController?`, optional, default `nil`): The presenting view controller (default: the top-most one).

## Example

**Swift**

```swift
tys.present(product: "SKU-123")                 // or step: .view, from: viewController
```

**Kotlin**

```kotlin
tys.present(activity, "SKU-123")                // or step = OpenStep.VIEW
```

**React Native**

```tsx
present("SKU-123");                             // or present("SKU-123", "view")
```

**Flutter**

```dart
await tys.present('SKU-123');                   // or step: OpenStep.view
```
