Skip to content

Commit

Permalink
Rename ITMComponent to ITMNativeUIComponent.
Browse files Browse the repository at this point in the history
  • Loading branch information
tcobbs-bentley committed Aug 26, 2021
1 parent ef78f76 commit f66f250
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Sources/ITwinMobile/ITMActionSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import PromiseKit
import UIKit
import WebKit

class ITMActionSheet: ITMComponent {
class ITMActionSheet: ITMNativeUIComponent {
override init(viewController: UIViewController, itmMessenger: ITMMessenger) {
super.init(viewController: viewController, itmMessenger: itmMessenger)
queryHandler = itmMessenger.registerQueryHandler("Bentley_ITM_presentActionSheet") { (params: [String: Any]) -> Promise<()> in
Expand Down
2 changes: 1 addition & 1 deletion Sources/ITwinMobile/ITMAlert.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct ITMAlertAction: Codable, Equatable {

// MARK: - ITMAlert class

class ITMAlert: ITMComponent {
class ITMAlert: ITMNativeUIComponent {
override init(viewController: UIViewController, itmMessenger: ITMMessenger) {
super.init(viewController: viewController, itmMessenger: itmMessenger)
queryHandler = itmMessenger.registerQueryHandler("Bentley_ITM_presentAlert", handleQuery)
Expand Down
6 changes: 3 additions & 3 deletions Sources/ITwinMobile/ITMNativeUI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ extension CGRect {
// MARK: - ITwinMobile class

open class ITMNativeUI {
private var components: [ITMComponent] = []
private var components: [ITMNativeUIComponent] = []
public init(viewController: UIViewController, itmMessenger: ITMMessenger) {
components.append(ITMActionSheet(viewController: viewController, itmMessenger: itmMessenger))
components.append(ITMAlert(viewController: viewController, itmMessenger: itmMessenger))
// components.append(ITMDatePicker(viewController: viewController, itmMessenger: itmMessenger))
}

public func addComponent(_ component: ITMComponent) {
public func addComponent(_ component: ITMNativeUIComponent) {
components.append(component)
}

Expand All @@ -58,7 +58,7 @@ open class ITMNativeUI {
}
}

open class ITMComponent: NSObject {
open class ITMNativeUIComponent: NSObject {
public var queryHandler: ITMQueryHandler?
public var itmMessenger: ITMMessenger
public weak var viewController: UIViewController?
Expand Down

0 comments on commit f66f250

Please sign in to comment.