When I create a MSStickerBrowserViewController subclass by embedding it in a container view (using a storyboard) as the documentation suggests, I appear to have no opportunity to set the stickerSize. The Sticker Browser VC is initialized with init(coder:), and I have no way that I can see to override the get-only property stickerSize. I can only get stickerSize = MSStickerSize.regular.
I don't see any control in interface builder to configure the property either, though the documentation says "You can also customize the size of the stickers inside the browser."
Thanks to shallowThought, I see that an initializer is available init(stickerSize: MSStickerSize) on MSStickerBrowserViewController, but so far I have been unable to find a way to trigger that initializer when using a storyboard and overriding the required init(coder:) initializer.
Am i missing something?
Thanks!
You can set it when initializing.
From Apples documentation.
StickerBroweserView
StickerBroweserViewController
To subclass it, implement the corresponding
init
ializers.I can not see a way to call
init(stickerSize: MSStickerSize)
by somehow chaininginit
calls fromrequired init?(coder aDecoder: NSCoder)
, so you might have to instantiate the viewControllers programmatically.