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 Before You Begin 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
25
26
27
import UIKit
import Stipop

class ViewController: UIViewController {

    @IBOutlet weak var stipopButton: SPUIButton!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        let user = SPUser(userID: "some_user_id")
        stipopButton.setUser(user, viewType: .picker) // Choose .search or .picker
        stipopButton.delegate = self
    }
}

extension ViewController: SPUIDelegate {
  
    func onStickerSingleTapped(_ view: SPUIView, sticker: SPSticker) {
      // This function will be executed when user chooses a sticker.
    }
  
    /* If you want to use double tap feature, change the plist file and implement this function. */
    func onStickerDoubleTapped(_ view: SPUIView, sticker: SPSticker) {
      // This function will be executed when user chooses a sticker.
    }

}

'userID' of SPUser is a string for identifying each user. Email, id, nickname or etc might be used as a userID.

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
24
25
26
class ViewController: UIViewController {

    @IBOutlet weak var stipopButton: SPUIButton!
    @IBOutlet weak var stickerView: SPUIStickerView!

    override func viewDidLoad() {
      super.viewDidLoad()
      
      let user = SPUser(userID: "some_user_id")
      stipopButton.setUser(user, viewType: .picker) // Choose .search or .picker
      stipopButton.delegate = self
    }
}

extension ViewController: SPUIDelegate {
    
    func onStickerSingleTapped(_ view: SPUIView, sticker: SPSticker) {
      stickerView.setSticker(sticker)  // Or, use stickerView.setSticker(sticker.stickerImg)
    }
  
    /* If you want to use double tap feature, change the plist file and implement this function. */
    func onStickerDoubleTapped(_ view: SPUIView, 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.