Skip to content

Instantly share code, notes, and snippets.

Last active December 17, 2018 16:51
What would you like to do?
Example BLTNItem for displaying a web view
import BLTNBoard
import WebKit
class BLTNWebPageItem: FeedbackPageBLTNItem {
let url: URL
init(url: URL) {
self.url = url
super.init(title: "Web Page")
isDismissable = false
actionButtonTitle = "Continue"
// MARK: - Interface
var webView: WKWebView?
override func makeViewsUnderDescription(with interfaceBuilder: BLTNInterfaceBuilder) -> [UIView]? {
let webView = WKWebView()
webView.backgroundColor = .white
let webViewWrapper = interfaceBuilder.wrapView(webView, width: nil, height: 256, position: .pinnedToEdges)
self.webView = webView
return [webViewWrapper]
override func willDisplay() {
let request = URLRequest(url: url)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment