Skip to content

Commit

Permalink
Add cancelConnect to BLEConnectionManager #6260
Browse files Browse the repository at this point in the history
  • Loading branch information
remihrt committed Sep 18, 2020
1 parent afd498b commit 08ab061
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion uCubeSampleApp/MenuTableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ class MenuTableViewController: AlertPresenterTableViewController {
presentAlert(title: nil, message: "Disconnecting from \(device.name)...")
deviceConnection.disconnect()
} else {
presentAlert(title: nil, message: "Connecting to \(device.name)...")
presentAlert(title: nil, message: "Connecting to \(device.name)...", actions: [
AlertAction(title: "Cancel", handler: {
BLEConnectionManager.shared.cancelConnect()
})
])
deviceConnection.connect()
}
}
Expand Down

0 comments on commit 08ab061

Please sign in to comment.