Skip to content

Commit

Permalink
Add support for Voice Over gesture "Scrubbing" to go back or cancel call
Browse files Browse the repository at this point in the history
  • Loading branch information
duemunk committed Dec 17, 2014
1 parent 2e958f2 commit 0a23dd5
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 0 deletions.
10 changes: 10 additions & 0 deletions BeMyEyes/Source/Controllers/BMECallViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,16 @@ - (void)shouldLocalize {
self.disconnectButton.title = MKLocalizedFromTable(BME_CALL_DISCONNECT, BMECallLocalizationTable);
}


- (BOOL)accessibilityPerformEscape {
if (self.disconnecting) {
return NO;
}
[self disconnect];
return YES;
}


#pragma mark -
#pragma mark Private Methods

Expand Down
5 changes: 5 additions & 0 deletions BeMyEyes/Source/Controllers/BMEForgotPasswordViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ - (UIStatusBarAnimation)preferredStatusBarUpdateAnimation
return self.scrollViewHelper.preferredStatusBarUpdateAnimation;
}

- (BOOL)accessibilityPerformEscape {
[self.navigationController popViewControllerAnimated:NO];
return YES;
}


#pragma mark - Public Methods

Expand Down
5 changes: 5 additions & 0 deletions BeMyEyes/Source/Controllers/BMEIntroViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,9 @@

@implementation BMEIntroViewController

- (BOOL)accessibilityPerformEscape {
[self.navigationController popViewControllerAnimated:NO];
return YES;
}

@end
5 changes: 5 additions & 0 deletions BeMyEyes/Source/Controllers/BMELoginViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
}
}

- (BOOL)accessibilityPerformEscape {
[self.navigationController popViewControllerAnimated:NO];
return YES;
}

#pragma mark -
#pragma mark Private Methods

Expand Down
5 changes: 5 additions & 0 deletions BeMyEyes/Source/Controllers/BMEPrivacyPolicyViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,9 @@ - (void)shouldLocalize {
[self.backButton setTitle:MKLocalizedFromTable(BME_PRIVACY_POLICY_BACK, BMEPrivacyPolicyLocalizationTable) forState:UIControlStateNormal];
}

- (BOOL)accessibilityPerformEscape {
[self.navigationController popViewControllerAnimated:NO];
return YES;
}

@end
7 changes: 7 additions & 0 deletions BeMyEyes/Source/Controllers/BMESettingsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ - (void)shouldLocalize {
self.versionLabel.text = versionText;
}


- (BOOL)accessibilityPerformEscape {
[self dismissViewControllerAnimated:NO completion:nil];
return YES;
}


#pragma mark -
#pragma mark Private Methods

Expand Down
6 changes: 6 additions & 0 deletions BeMyEyes/Source/Controllers/BMESignUpMethodViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ - (void)shouldLocalize {
self.privacyButton.accessibilityHint = MKLocalizedFromTable(BME_SIGN_UP_METHOD_PRIVACY_ACCESSIBILITY_HINT, BMESignUpMethodLocalizationTable);
}

- (BOOL)accessibilityPerformEscape {
[self.navigationController popViewControllerAnimated:NO];
return YES;
}


#pragma mark -
#pragma mark Private Methods

Expand Down
6 changes: 6 additions & 0 deletions BeMyEyes/Source/Controllers/BMESignUpViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ - (UIStatusBarAnimation)preferredStatusBarUpdateAnimation
return self.scrollViewHelper.preferredStatusBarUpdateAnimation;
}

- (BOOL)accessibilityPerformEscape {
[self.navigationController popViewControllerAnimated:NO];
return YES;
}


#pragma mark -
#pragma mark Private Methods

Expand Down
5 changes: 5 additions & 0 deletions BeMyEyes/Source/Controllers/BMETermsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,9 @@ - (void)shouldLocalize {
[self.backButton setTitle:MKLocalizedFromTable(BME_TERMS_BACK, BMETermsLocalizationTable) forState:UIControlStateNormal];
}

- (BOOL)accessibilityPerformEscape {
[self.navigationController popViewControllerAnimated:NO];
return YES;
}

@end
5 changes: 5 additions & 0 deletions BeMyEyes/Source/Controllers/IntroVideoViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,9 @@ class IntroVideoViewController: VideoViewController {
moviePlayerController.play()
}
}

override func accessibilityPerformEscape() -> Bool {
navigationController?.popViewControllerAnimated(false)
return true
}
}

0 comments on commit 0a23dd5

Please sign in to comment.