StorylyView

@objc(StorylyView)
public final class StorylyView : UIView

This class is the main view of Storyly.

  • This property triggers StorylyView initialization

    Declaration

    Swift

    @objc
    public var storylyInit: StorylyInit { get set }
  • RootviewController of the StorylyView

    Declaration

    Swift

    @objc
    public weak var rootViewController: UIViewController?
  • Delegate of the StorylyView which will notify you when an event occurs in StorylyView.

    Declaration

    Swift

    @objc
    public weak var delegate: StorylyDelegate?
  • This property will allow you to add external view between stories

    Declaration

    Swift

    @objc
    public weak var storylyExternalViewProvider: StorylyExternalViewProvider?
  • This property will allow you to add custom custom loading view

    Declaration

    Swift

    @objc
    public weak var storylyLoadingView: StorylyLoadingView? { get set }
  • This property allows you to change the border color of the story group icons which are watched by the user.

    Declaration

    Swift

    @objc
    public var storyGroupIconBorderColorSeen: [UIColor] { get set }
  • This property allows you to change the border color of the story group icons which are unwatched by the user.

    Declaration

    Swift

    @objc
    public var storyGroupIconBorderColorNotSeen: [UIColor] { get set }
  • This property allows you to change the background color of the story group icon which is shown to the user as skeleton view till the stories are loaded

    Declaration

    Swift

    @IBInspectable
    public var storyGroupIconBackgroundColor: UIColor { get set }
  • This property allows you to change the gradient colors behind the story group text if group size is set to XLarge

    Declaration

    Swift

    @IBInspectable
    public var storyGroupIconForegroundColors: [UIColor] { get set }
  • This property allows you to change the text color of the story group

    Declaration

    Swift

    @IBInspectable
    public var storyGroupTextColor: UIColor { get set }
  • This property allows you to change the font of the story group text

    Declaration

    Swift

    @IBInspectable
    public var storyGroupTextFont: UIFont { get set }
  • If any of the story group is selected as pinned group from dashboard, a little star icon will appear along with the story group icon. This property allows you to change the background color of this pin icon

    Declaration

    Swift

    @IBInspectable
    public var storyGroupPinIconColor: UIColor { get set }
  • This property allows you to change the header icon border color of the story view

    Declaration

    Swift

    @objc
    public var storyItemIconBorderColor: [UIColor] { get set }
  • This property allows you to change the header text color of the story view

    Declaration

    Swift

    @IBInspectable
    public var storyItemTextColor: UIColor { get set }
  • This property allows you to change the font of the story view header text

    Declaration

    Swift

    @IBInspectable
    public var storyItemTextFont: UIFont { get set }
  • This property allows you to change the progress bar colors of the story view.

    Declaration

    Swift

    @objc
    public var storylyItemProgressBarColor: [UIColor] { get set }
  • This property allows you to change the size of the story group

    Declaration

    Swift

    @IBInspectable
    public var storyGroupSize: String { get set }
  • This property allows you to change height of the story group icon

    See also

    StoryGroupIconStyling

    Declaration

    Swift

    @IBInspectable
    @objc
    public var storyGroupIconHeight: CGFloat { get set }
  • This property allows you to change width of the story group icon

    See also

    StoryGroupIconStyling

    Declaration

    Swift

    @IBInspectable
    @objc
    public var storyGroupIconWidth: CGFloat { get set }
  • This property allows you to change corner radius value of the story group icon

    See also

    StoryGroupIconStyling

    Declaration

    Swift

    @IBInspectable
    @objc
    public var storyGroupIconCornerRadius: CGFloat { get set }
  • This property allows you to change the visibility of the story group text

    See also

    StoryGroupTextStyling

    Declaration

    Swift

    @IBInspectable
    @objc
    public var storyGroupTextIsVisible: Bool { get set }
  • This property allows you to change the visibility of the story view header text

    See also

    StoryHeaderStyling

    Declaration

    Swift

    @IBInspectable
    @objc
    public var storyHeaderTextIsVisible: Bool { get set }
  • This property allows you to change the visibility of the story view header icon

    See also

    StoryHeaderStyling

    Declaration

    Swift

    @IBInspectable
    @objc
    public var storyHeaderIconIsVisible: Bool { get set }
  • This property allows you to change the visibility of the story view header close button

    See also

    StoryHeaderStyling

    Declaration

    Swift

    @IBInspectable
    @objc
    public var storyHeaderCloseButtonIsVisible: Bool { get set }
  • This property allows you to change the padding value between story groups

    See also

    StoryGroupListStyling

    Declaration

    Swift

    @IBInspectable
    @objc
    public var storyGroupListPaddingBetweenItems: CGFloat { get set }
  • This property allows you to change the edge padding value of the first and last story groups

    See also

    StoryGroupListStyling

    Declaration

    Swift

    @IBInspectable
    @objc
    public var storyGroupListEdgePadding: CGFloat { get set }
  • This property allows you to change the shape of the story group icons, their corners and the distance between each other if you set your story group size as custom

    See also

    StoryGroupIconStyling

    Declaration

    Swift

    @objc
    public var storyGroupIconStyling: StoryGroupIconStyling { get set }
  • This property allows you to change the visibility of story group text

    See also

    StoryGroupTextStyling

    Declaration

    Swift

    @objc
    public var storyGroupTextStyling: StoryGroupTextStyling { get set }
  • This property allows you to change the visibility of story view header icon and text.

    See also

    StoryHeaderStyling

    Declaration

    Swift

    @objc
    public var storyHeaderStyling: StoryHeaderStyling { get set }
  • This property allows you to change the distance between the story groups and edge paddings of the first and last story groups

    See also

    StoryGroupListStyling

    Declaration

    Swift

    @objc
    public var storyGroupListStyling: StoryGroupListStyling { get set }
  • This property allows you to change the IVoD groups seen, unseen border colors and IVoD icon color

    See also

    StoryGroupListStyling

    Declaration

    Swift

    @objc
    public var storyGroupIconColorStyling: StoryGroupIconColorStyling { get set }
  • If any of the story group is selected as Ivod group type from dashboard, a little camera will appear along with the story group icon. This property allows you to change the background color of this Ivod icon

    Declaration

    Swift

    @IBInspectable
    public var storyGroupIVodIconColor: UIColor { get set }
  • This property allows you to use different story groups images for different labels

    Declaration

    Swift

    @IBInspectable
    public var storyGroupIconImageThematicLabel: String { get set }
  • This property allows you to change the language shown in storyly elements. Current supported langeuages are: TR, ES, RU, DE, FR, EN

    Declaration

    Swift

    @IBInspectable
    public var languageCode: String { get set }
  • This function allows you to load Storyly when it moves to the current window

    Declaration

    Swift

    public override func willMove(toWindow newWindow: UIWindow?)
  • This function allows you to refetch the data from network By default you do not need to use this function.

    Declaration

    Swift

    @objc
    public func refresh()
  • This function allows you to open a specific story using story group id and story id.

    Declaration

    Swift

    public func openStory(storyGroupId: Int, storyId: Int? = nil) -> Bool

    Parameters

    storyGroupId

    Story group id of the story to be opened

    storyId

    Story id of the story to be opened

    Return Value

    Success of the operation

  • This function allows you to open a specific story using story group id and story id. (For Objective-C version)

    Declaration

    Swift

    @objc(openStoryWithId:storyId:)
    public func openStory(storyGroupId: NSNumber, storyId: NSNumber?) -> Bool

    Parameters

    storyGroupId

    Story group id of the story to be opened

    storyId

    Story id of the story to be opened

    Return Value

    Success of the operation

  • This function allows you to open using deeplink uri.

    Declaration

    Swift

    @objc
    public func openStory(payload: URL) -> Bool

    Parameters

    payload

    Intent data which includes storyly as host

    Return Value

    Success of the operation

  • This function allows you to pause the current story

    Declaration

    Swift

    @objc
    public func pause()
  • This function allows you to resume the current story

    Declaration

    Swift

    @objc
    public func resume()
  • This function allows you to dismiss story view.

    Declaration

    Swift

    @objc
    public func dismiss(animated: Bool, completion: (() -> Void)? = nil)

    Parameters

    animation

    Dismiss animation can be customized using this parameter

    completion

    Actions to do after dismiss

  • This function allows you to open the story view.

    Declaration

    Swift

    @objc
    public func present(animated: Bool, completion: (() -> Void)? = nil)

    Parameters

    animation

    Opening animation can be customized using this parameter

    completion

    Actions to do after present

  • This function allows you to specify data of custom template groups

    Declaration

    Swift

    public func setExternalData(externalData: [[String : Any?]]?) -> Bool

    Parameters

    externalData

    key/value mappings to match and fill template data

    Return Value

    Success of the operation

  • This function allows you to open your custom external view

    Declaration

    Swift

    @objc
    public func showExternalActionView(externalActionView: UIView)

    Parameters

    externalActionView

    External view to show

  • This function dismisses your already open external view

    Declaration

    Swift

    @objc
    public func dismissExternalActionView()
  • This function allows you to specify data of custom template groups (For Objective-C version)

    Declaration

    Swift

    @objc(setExternalData:)
    public func setExternalData(externalData: [NSDictionary]?) -> Bool

    Parameters

    externalData

    key/value mappings to match and fill template data

    Return Value

    Success of the operation