Player vertical anchor
You can configure where the story player view will get anchored in your superview. To do that, you need to update the playerVerticalAnchor
parameter either on JoinStoriesStandaloneConfig or JoinStoriesThumbConfig.
For a standalone config:
import JoinStoriesSDK
let standaloneConfig = StoryViewConfig(
..., // Other parameters to set
playerVerticalAnchor: .bottom,
...
)
JoinStories.startPlayer(config: standaloneConfig, fromController: _yourViewController_, completion: _yourCompletion_, onDismiss: _yourDismissCompletion_)
For a thumbView config:
import JoinStoriesSDK
let thumbViewConfig = JoinStoriesThumbConfig(
..., // Other parameters to set
playerVerticalAnchor: .bottom,
...
)
JoinStories.startThumbView(config: thumbViewConfig, completion: _yourCompletion_)
PlayerVerticalAnchor enum cases:
Name | Animation |
---|---|
top(ignoresTopSafeArea: Bool = true) | If the player's height is smaller than screen height, anchor it to the top of the screen. Default value of ignoresTopSafeArea is true (used in case where we want to hide status bar from the screen. So you can specify it by simply calling .top which means .top(ignoresTopSafeArea: true) |
bottom | If the player's height is smaller than screen height, anchor it to the bottom of the screen |
center | If the player's height is smaller than screen height, anchor it to the center of the screen |
Default case of PlayerVerticalAnchor
is .bottom
.