Skip to content

Commit

Permalink
Add support for Objc (and tested locally in a project)
Browse files Browse the repository at this point in the history
  • Loading branch information
spinach committed Jul 18, 2018
1 parent 6054917 commit fb77474
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Binary file not shown.
Binary file not shown.
8 changes: 5 additions & 3 deletions VoiceOverlay/Controllers/VoiceOverlayController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import UIKit
import Speech

/// Controller that takes care of launching a voice overlay and providing handlers to listen to text and error events.
public class VoiceOverlayController {
@objc public class VoiceOverlayController: NSObject {

let permissionViewController = PermissionViewController()
let noPermissionViewController = NoPermissionViewController()
Expand All @@ -26,9 +26,11 @@ public class VoiceOverlayController {

public var datasource: Any? = nil

public init() {}
public override init() {
super.init()
}

public func start(on view: UIViewController, textHandler: @escaping SpeechTextHandler, errorHandler: @escaping SpeechErrorHandler, resultScreenHandler: SpeechResultScreenHandler? = nil) {
@objc public func start(on view: UIViewController, textHandler: @escaping SpeechTextHandler, errorHandler: @escaping SpeechErrorHandler, resultScreenHandler: SpeechResultScreenHandler? = nil) {
self.speechTextHandler = textHandler
self.speechErrorHandler = errorHandler
self.speechResultScreenHandler = resultScreenHandler
Expand Down

0 comments on commit fb77474

Please sign in to comment.