Skip to content

Commit

Permalink
voice over notifications for SVProgress modals ref roundware#39
Browse files Browse the repository at this point in the history
  • Loading branch information
seeReadCode committed Mar 8, 2017
1 parent 467d253 commit 0517748
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
6 changes: 5 additions & 1 deletion Digita11y/ChooseProjectViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ class ChooseProjectViewController: BaseViewController, UIScrollViewDelegate, RWF

@IBAction func selectedThis(_ sender: UIButton) {
let projectId = sender.tag
SVProgressHUD.show(withStatus: "Loading project data")
let status = "Loading project data"
SVProgressHUD.show(withStatus: status)
if (UIAccessibilityIsVoiceOverRunning()) {
UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, status);
}
let rwf = RWFramework.sharedInstance
self.viewModel.selectedProject = self.viewModel.data.getProjectById(projectId)
rwf.setProjectId(project_id: String(projectId))
Expand Down
6 changes: 5 additions & 1 deletion Digita11y/ContributeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,11 @@ class ContributeViewController: BaseViewController, UIScrollViewDelegate, UIText
}

rwf.uploadAllMedia(tagIdsAsString: self.viewModel.tagIds())
SVProgressHUD.show(withStatus: "Uploading")
let status = "Uploading"
SVProgressHUD.show(withStatus: status)
if (UIAccessibilityIsVoiceOverRunning()) {
UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, status);
}
}


Expand Down
18 changes: 15 additions & 3 deletions Digita11y/RoomsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ class RoomsViewController: BaseViewController, RWFrameworkProtocol, AKPickerView
DebugLog("skip item")
let rwf = RWFramework.sharedInstance
rwf.skip()
SVProgressHUD.show(withStatus: "Remixing your live audio stream… please hold!")
let status = "Remixing your live audio stream… please hold!"
SVProgressHUD.show(withStatus: status)
if (UIAccessibilityIsVoiceOverRunning()) {
UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, status);
}
guard let currentAsset = self.viewModel.currentAsset,
let objectViewIndex = objectViews.index(where: { $0.arrayOfAssetIds.contains( String(currentAsset.assetID) )}) else {
DebugLog("no item to mark completed")
Expand All @@ -79,7 +83,11 @@ class RoomsViewController: BaseViewController, RWFrameworkProtocol, AKPickerView
DebugLog("replay")
let rwf = RWFramework.sharedInstance
rwf.replayAsset()
SVProgressHUD.show(withStatus: "Remixing your live audio stream… please hold!")
let status = "Remixing your live audio stream… please hold!"
SVProgressHUD.show(withStatus: status)
if (UIAccessibilityIsVoiceOverRunning()) {
UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, status);
}
}


Expand Down Expand Up @@ -373,7 +381,11 @@ class RoomsViewController: BaseViewController, RWFrameworkProtocol, AKPickerView
rwf.resume()
} else {
rwf.play()
SVProgressHUD.show(withStatus: "Loading Stream")
let status = "Loading Stream"
SVProgressHUD.show(withStatus: status)
if (UIAccessibilityIsVoiceOverRunning()) {
UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, status);
}
waitingToStart = true
}

Expand Down

0 comments on commit 0517748

Please sign in to comment.