Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This guide describes using the Stories widget in an iOS mobile app. 

There are two integration ways to display Stories:

  • XIB (StoryBoard)
  • In the app code

XIB (StoryBoard)

1. Create a new "View" in the StoryBoard editor. Change the "View" class from "UIView" to "StoriesView".

2. Add a variable to the "viewController.swift" controller:

Code Block
languagejava
themeFadeToGrey
@IBOutlet private weak var storiesBackView: StoriesView!

3. Initialize it:

Code Block
languagejava
themeFadeToGrey
// For example in viewDidLoad
storiesBackView.configure(sdk: SDK, mainVC: self, code: "%CODE%")

NameTypeRequirementDescription
%CODE%stringrequiredThe story widget code. The unique code is available in the PersonaClick account in each Stories block's "data-code" attribute.


In the app code

1. Import the library:

Code Block
languagejava
themeFadeToGrey
import PersonaClick

2. Create "view":

Code Block
languagejava
themeFadeToGrey
var storiesView = StoriesView(frame: CGRect(x: 0, y: 0, width: 0, height: 0))
view.addSubview(storiesView)

3. initialize it:

Code Block
languagejava
themeFadeToGrey
// For example in viewDidLoad
storiesView.configure(sdk: SDK, mainVC: self, code: "%CODE%")


NameTypeRequirementDescription
%CODE%stringrequiredThe story widget code. The unique code is available in the PersonaClick account in each Stories block's "data-code" attribute.



Column

Page Navigation

Table of Contents
maxLevel2
indent0px
stylenone




Related Pages

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
sorttitle
cqllabel = "stories"