Stipop Docs | Documentation for SDK and API

Quick Implementation (SPUIButton)

You can integrate Stipop UI SDK into your app in a minute with SPUIButton. Just place the button. Then our SDK will do the rest complicated things. If a user touches the button, it'll automatically show Search View or Picker View. You can choose which one to appear.

All you have to care is to make wonderful features with our stickers.


Before you begin

Make sure you went through all processes in Quick Start to download and setup the Stipop.plist file, which is required to complete development of the SDK.

1. Make a UIView Object on Storyboard

Go to the Storyboard or Xib you want to place the button. Make an object and link it with @IBOutlet like video below.


2. Set Delegate

You should set delegate to handle our SDK.

ViewController.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import UIKit
import Stipop

class ViewController: UIViewController, SPUIButtonDelegate {
    @IBOutlet weak var stipopButton: SPUIButton!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.stipopButton.delegate = self
    }

    var user: SPUser {
        return SPUser(userID: "some_user_id")
    }

    var viewType: SPViewType {
        // Choose .search or .picker
        return .picker
    }

    func onStickerSelect(_ sticker: SPSticker) {
        // This function will be executed when user chooses a sticker.
    }
}

3. How to Show Sticker Image

Use SPStickerView to show sticker image. First, make an object in storyboard or xib like video below.

SPUIStickerView provides a method to show sticker image. Refer to the code below and find out how it works!

ViewController.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
class ViewController: UIViewController, SPUIButtonDelegate {
    @IBOutlet weak var btn: SPUIButton!
    @IBOutlet weak var stickerView: SPUIStickerView!

    override func viewDidLoad() {
      super.viewDidLoad()
      self.btn.delegate = self
    }

    var user: SPUser {
        return SPUser(userID: "some_user_id")
    }

    var viewType: SPViewType {
        // Choose .search or .picker
        return .picker
    }

    func onStickerSelect(_ sticker: SPSticker) {
        stickerView.setSticker(sticker)
        // Or, Use stickerView.setSticker(sticker.stickerImg)
    }
}

4. Done

It's that easy to use our SDK!

If you want to present SPSearchView or SPPickerView in your way, See Search View or Picker View.


Next step: See How our SDK View Work

Now that you've got the SPUIButton done, let's see how Search View and Sticker Picker View works in detail.

We’re here to help. Contact us.