<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Messages",
  "identifier" : "/documentation/Messages/MSStickerView/init(frame:sticker:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Messages"
    ],
    "preciseIdentifier" : "c:objc(cs)MSStickerView(im)initWithFrame:sticker:"
  },
  "title" : "init(frame:sticker:)"
}
-->

# init(frame:sticker:)

Initializes a new sticker view with the provided sticker and frame.

```
init(frame: CGRect, sticker: MSSticker?)
```

## Parameters

`frame`

A rectangular frame for the view, measured in points. The origin of the frame is relative to its superview. This method uses the provided rectangle to set the view’s <doc://com.apple.documentation/documentation/UIKit/UIView/center> and <doc://com.apple.documentation/documentation/UIKit/UIView/bounds> properties.

`sticker`

The sticker object to be displayed. Pass `nil` to create an empty sticker view.

## Return Value

A newly initialized sticker view.

## Discussion

If the sticker image is larger than the view’s frame, the view scales down the sticker to fit. If the frame is larger than the sticker image, the view centers the image in the frame.

---

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)