Skip to content

Instantly share code, notes, and snippets.

View JoelJWest's full-sized avatar

Joel West JoelJWest

View GitHub Profile
val someThing = "hello world"
# BotGen v1.0
# Joel West and Scott Recker
# This document is written using TOML format.
# For more information visit https://github.com/toml-lang/toml
############################ Required Configurations ############################
#Servers BotGen can connect to
# Use the following format for each server you wish to add:

VoiceOver Implementation Checklist

  • Explore existing VoiceOver functionality before doing anything
  • Review Android implementation
  • Add accessibilityIdentifier
  • Add accessibilityLabel
  • Change accessibilityLabel if the UI element state changes
  • Add accessibilityHint
  • Enclose icon buttons and associated labels in a container view
  • Set isAccessibilityElement to NO for UI elements which should not be announced
  • Use isAccessibilityElement for container views
- (void)testCompleteEnrollment {
BNRemoteDepositStartViewController *const startController = [BNRemoteDepositStartViewController new];
__block UIAlertController *alertController;
BNValidateBlock validator = extractArgTo(alertController);
id mockController = OCMPartialMock(startController);
[mockController setExpectationOrderMatters:YES];
OCMExpect([mockController setShouldShowSignUpSubmitted:YES]);
- (void)testAnArgument {
NSString *const labelText = @"Label Text";
NSString *const title = @"Title";
NSString *const backgroundImageName = @"Image Name";
UINavigationController *navController = [UINavigationController new];
BNPayeeCreateTaskController *taskController = [BNPayeeCreateTaskController new];
BOOL (^validator)(BNTaskWaitViewController *) = ^(BNTaskWaitViewController *waitController) {
BOOL isCorrectClass = [waitController isKindOfClass:[BNTaskWaitViewController class]];
- (IBAction)remove:(id)sender {
if (self.rdcAccountsFRC.fetchedObjects.count < 1) {
return;
}
BNModelController *const modelController = [BNModelController new];
// BGLManagedObjectContextHolder has helpful methods, particularly related to saving changes to the context
// (i.e., persisting data to disk).
BGLManagedObjectContextHolder *const mainContextHolder = modelController.stack.mainContextHolder;
- (TOCFuture *)updateAccount {
self.saveButton.enabled = NO;
BGLManagedAccountEditor *const accountEditor = [self newAccountEditor];
[accountEditor setContributesToAggregateTotals:self.settingsSession.contributesToAggregateTotals];
[accountEditor setLowFundsAlertEnabled:self.settingsSession.lowBalanceAlertEnabled];
[accountEditor setLowFundsAlertThreshold:self.settingsSession.lowBalanceThreshold];
[accountEditor setAccountType:[BGLManagedAccount accountTypeForAccountClass:self.settingsSession.accountClass]];
[accountEditor setFavorited:self.settingsSession.favorite];
NSString *textLabel = [NSString new];
id mockHud = OCMClassMock([MBProgressHUD class]);
OCMExpect([mockHud showHUDAddedTo:settingsViewController.view animated:YES]);
OCMExpect([mockHud labelText]).andReturn(textLabel);
OCMExpect([mockHud hide:YES]);
TOCFuture *accountEditFuture = [settingsViewController updateAccount];
XCTAssertNotNil(accountEditFuture, @"Should have received a non-nil instance of %@", [TOCFuture class]);
XCTAssertEqualObjects(textLabel, @"Loading", @"");
- (void)viewWillTransitionToSize:(CGSize)size
withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
NSUInteger currentAccountIndex = self.currentAccountIndex;
[super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
[coordinator animateAlongsideTransition:nil
completion:^ (id<UIViewControllerTransitionCoordinatorContext> context) {
self.currentAccountIndex = currentAccountIndex;
self.accountsCollectionView.contentOffset = CGPointMake(self.accountsCollectionView.width * currentAccountIndex, 0.f);
}];
- (void)viewWillTransitionToSize:(CGSize)size
withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator
{
// dont show that the page is incorrect breifly during transition
NSUInteger currentAccountIndex = self.currentAccountIndex;
[super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
[coordinator animateAlongsideTransition:nil
completion:^ (id<UIViewControllerTransitionCoordinatorContext> context) {