Custom Overlays Guide
StreamLayer now supports custom overlays on iOS. Once you integrate the latest version of the SDK, you can create custom overlays with any content and functionality your application needs.
Step by step guide
- First up, create a custom menu by following this example.
private var customMenuItem: SLRCustomMenuItem = {
let menuItem = SLRCustomMenuItem(viewController: MyCustomOverlayViewController())
menuItem.iconImage = UIImage(named: "customMenuIcon")
menuItem.title = "<YOUR TITLE>"
return menuItem
}()- Now that you have created a custom menu, you can add it to the view controller stack when you want to present it to a user. The example is here
StreamLayer.createSession(for: eventId, andAddMenuItems: [self.customMenuItem])Note If you don't pass anything or pass nil, the custom overlay won't appear. If in your list of menuItems, there will be an empty link in menuItem.viewController which will also cause the overlay to fail to appear. If any pictures are nil, then the button will appear without an image.
Updated 6 months ago
