Study Intro

  • Intro configuration can be stored to a JSON file and be read by an instance from this class.

    A sample configuration, showing a StudyIntroWelcomeItem, a StudyIntroVideoItem and a StudyIntroHTMLItem, might look like this:

    {
      "title": "C Tracker",
      "logo": "logo_institute",
      "items": [
        {
          "type": "welcome",
          "title": "Welcome to C\u00a0Tracker",
          "subtitle": "A Hepatitis C Research Study",
          "video": "CTracker"
        },
        {
          "type": "video",
          "video": "CTracker"
        },
        {
          "title": "About this Study",
          "filename": "Intro_about",
        }
      ],
      "eligibility": {
        "letsCheckMessage": "Let's see if you're eligible to join this study",
        "eligibleMessage": "Tap the button below to start the consenting process",
        "ineligibleMessage": "Thank you for your interest"
      }
    }
    
    See more

    Declaration

    Swift

    open class StudyIntroConfiguration
  • A collection view controller that renders a logo image and a title at the top, a square-ish section of horizontally swipeable content in the center, and a Join Study button at the bottom.

    You can use StudyIntro.storyboard provided with the framework but you must add it to your app yourself. Customization is done via configuration, which you can either do manually in code or – much better – by using a JSON file loaded by the StudyIntroConfiguration class.

    See more

    Declaration

    Swift

    open class StudyIntroCollectionViewController: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource, UIScrollViewDelegate
  • Study intro items represent one section to be shown on the introduction screen. Future participants can swipe between intro items to learn more about the study.

    Typically, each concrete study item is represented by a different type of collection view cell, hence the static cellReuseIdentifier property.

    See more

    Declaration

    Swift

    public protocol StudyIntroItem
  • Represents an intro item that shows the familiar Welcome screen.

    See more

    Declaration

    Swift

    open class StudyIntroWelcomeItem: StudyIntroItem
  • An intro item that will render an HTML page; only accepts HTML files that are included in the app bundle.

    See more

    Declaration

    Swift

    open class StudyIntroHTMLItem: StudyIntroItem
  • An intro item that only shows a title and a large thumbnail, representing the movie.

    See more

    Declaration

    Swift

    open class StudyIntroVideoItem: StudyIntroItem