diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a0b785b --- /dev/null +++ b/LICENSE @@ -0,0 +1,8 @@ +The MIT License (MIT) +Copyright © 2012-2013 Brandon Butler, https://github.com/Hackmodford + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/MSCurrencyFormatter.h b/MSCurrencyFormatter.h index dbca97a..deff5aa 100644 --- a/MSCurrencyFormatter.h +++ b/MSCurrencyFormatter.h @@ -10,10 +10,18 @@ @interface MSCurrencyFormatter : NSObject --(void)startWatchingForKeyboardFromTextField:(UITextField *)textField; +@property (nonatomic, copy) void (^textFieldShouldBeginEditingBlock)(UITextField *textField); +@property (nonatomic, copy) void (^textFieldDidBeginEditingBlock)(UITextField *textField); +@property (nonatomic, copy) void (^textFieldShouldEndEditingBlock)(UITextField *textField); +@property (nonatomic, copy) void (^textFieldDidEndEditingBlock)(UITextField *textField); -+(NSString *)formatTextField:(UITextField *)textField withCharactersInRange:(NSRange)range withReplacementString:(NSString *)string; +- (id)initWithLocale:(NSLocale *)locale withExtraButton:(int)extraButton; +- (id)initWithLocale:(NSLocale *)locale withDoubleZerosButton:(BOOL)doubleZerosButton; +- (id)initWithLocale:(NSLocale *)locale withToggleButton:(BOOL)toggleButton; +- (id)initWithLocale:(NSLocale *)locale; +- (void)startWatchingForKeyboardFromTextField:(UITextField *)textField; +- (NSString *)formatTextField:(UITextField *)textField withCharactersInRange:(NSRange)range withReplacementString:(NSString *)string; -+(NSDecimalNumber *)decimalNumberFromFormattedString:(NSString *)string; ++ (NSDecimalNumber *)decimalNumberFromFormattedString:(NSString *)string; @end diff --git a/MSCurrencyFormatter.m b/MSCurrencyFormatter.m index 197aa10..574052d 100644 --- a/MSCurrencyFormatter.m +++ b/MSCurrencyFormatter.m @@ -10,8 +10,13 @@ @interface MSCurrencyFormatter () +@property (nonatomic, strong) NSLocale *locale; +@property (nonatomic, strong) NSNumberFormatter *formatter; @property (nonatomic, strong) UIButton *toggleButton; +@property (nonatomic, strong) UIButton *doubleZerosButton; @property (nonatomic, weak) UITextField *assignedTextField; +@property (nonatomic, assign) BOOL withToggleButton; +@property (nonatomic, assign) BOOL withDoubleZerosButton; @property (nonatomic, assign) BOOL newButton; @property (nonatomic, assign) BOOL keyboardDidShow; @@ -19,329 +24,312 @@ @interface MSCurrencyFormatter () @implementation MSCurrencyFormatter -- (id)init { - - if ((self = [super init])) { - - if (self.toggleButton == nil) { - - // create custom button - self.toggleButton = [UIButton buttonWithType:UIButtonTypeCustom]; - self.toggleButton.frame = CGRectMake(0, 163, 105, 53); - self.toggleButton.adjustsImageWhenHighlighted = NO; - [self.toggleButton setImage:[UIImage imageNamed:@"toggleButtonUp.png"] forState:UIControlStateNormal]; - [self.toggleButton setImage:[UIImage imageNamed:@"toggleButtonDown.png"] forState:UIControlStateHighlighted]; - [self.toggleButton addTarget:self action:@selector(toggleButton:) forControlEvents:UIControlEventTouchUpInside]; - - } - - self.newButton = TRUE; +- (id)initWithLocale:(NSLocale *)locale withExtraButton:(int)extraButton +{ + if (self = [super init]) { + [self setLocale:locale]; + + if (extraButton == 1) { + [self setWithToggleButton:YES]; + } else if (extraButton == 2) { + [self setWithDoubleZerosButton:YES]; + } else { + [self setWithToggleButton:NO]; + [self setWithDoubleZerosButton:NO]; } - - return self; + + [self setFormatter:[[NSNumberFormatter alloc] init]]; + [[self formatter] setNumberStyle:NSNumberFormatterCurrencyStyle]; + [[self formatter] setLocale:[self locale]]; + + if ([self withToggleButton] && ![self toggleButton]) { + [self setToggleButton:[UIButton buttonWithType:UIButtonTypeCustom]]; + [[self toggleButton] setFrame:CGRectMake(0, 163, 105, 53)]; + [[self toggleButton] setAdjustsImageWhenHighlighted:NO]; + [[self toggleButton] setImage:[UIImage imageNamed:@"toggleButtonUp.png"] forState:UIControlStateNormal]; + [[self toggleButton] setImage:[UIImage imageNamed:@"toggleButtonDown.png"] forState:UIControlStateHighlighted]; + [[self toggleButton] addTarget:self action:@selector(toggleButton:) forControlEvents:UIControlEventTouchUpInside]; + + } else if ([self withDoubleZerosButton] && ![self doubleZerosButton]) { + [self setDoubleZerosButton:[UIButton buttonWithType:UIButtonTypeCustom]]; + [[self doubleZerosButton] setFrame:CGRectMake(0, 163, 105, 53)]; + [[self doubleZerosButton] setAdjustsImageWhenHighlighted:NO]; + [[self doubleZerosButton] setImage:[UIImage imageNamed:@"doubleZerosButtonUp.png"] forState:UIControlStateNormal]; + [[self doubleZerosButton] setImage:[UIImage imageNamed:@"doubleZerosButtonDown.png"] forState:UIControlStateHighlighted]; + [[self doubleZerosButton] addTarget:self action:@selector(doubleZerosButton:) forControlEvents:UIControlEventTouchUpInside]; + + } + [self setNewButton:TRUE]; + } + + return self; } -#pragma mark UIKeyboard Notifications +- (id)initWithLocale:(NSLocale *)locale withDoubleZerosButton:(BOOL)doubleZerosButton +{ + int toggle = 0; + if (doubleZerosButton) toggle = 2; + return [self initWithLocale:locale withExtraButton:toggle]; +} --(void)dealloc { - - [self endWatchingForKeyboard]; +- (id)initWithLocale:(NSLocale *)locale withToggleButton:(BOOL)toggleButton +{ + int toggle = 0; + if (toggleButton) toggle = 1; + return [self initWithLocale:locale withExtraButton:toggle]; } --(void)startWatchingForKeyboardFromTextField:(UITextField *)textField { - - self.assignedTextField = textField; - self.assignedTextField.keyboardType = UIKeyboardTypeNumberPad; - - if (![[[UIDevice currentDevice] model] isEqualToString:@"iPad"]) { - - //NSLog(@"start watching for keyboard"); - - - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(keyboardDidShow:) - name:UIKeyboardDidShowNotification - object:nil]; - - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(keyboardStartedEditing:) - name:UITextFieldTextDidBeginEditingNotification - object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(keyboardWasDismissed:) - name:UIKeyboardWillHideNotification - object:nil]; - - - - } +- (id)initWithLocale:(NSLocale *)locale +{ + return [self initWithLocale:locale withToggleButton:NO]; } +- (id)init +{ + return [self initWithLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"]]; +} +#pragma mark UIKeyboard Notifications -- (void)keyboardDidShow:(NSNotification *)note { - - self.keyboardDidShow = TRUE; - - if ([self.assignedTextField isFirstResponder] && self.newButton) { - - //NSLog(@"A new button is needed."); - - [self addButtonToKeyboard]; - - } - +- (void)dealloc +{ + [self endWatchingForKeyboard]; } +- (void)startWatchingForKeyboardFromTextField:(UITextField *)textField +{ + self.assignedTextField = textField; + self.assignedTextField.keyboardType = UIKeyboardTypeNumberPad; -- (void)keyboardStartedEditing:(NSNotification *)note { - - //This removes the button if we go to a different textfield. - - if ([self.assignedTextField isFirstResponder]) { - - //this will catch if a keyboard was already present and we changed first responder to our keyboard and need to add the button. - if (self.newButton && self.keyboardDidShow) { - //NSLog(@"keyboard started editing and newButton is needed and the keyboard is already visible"); - [self addButtonToKeyboard]; - } - - //textfield must have something in it otherwise this will crash. - if ([self.assignedTextField.text length] == 0 && self.assignedTextField.delegate == self) { - self.assignedTextField.text = @"$0.00"; - } - - self.toggleButton.hidden = NO; - self.toggleButton.userInteractionEnabled = YES; - - } else { - - self.toggleButton.hidden = YES; - self.toggleButton.userInteractionEnabled = NO; - + if (![[[UIDevice currentDevice] model] isEqualToString:@"iPad"]) { + if ([self withToggleButton] || [self withDoubleZerosButton]) { + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidShow:) name:UIKeyboardDidShowNotification object:nil]; } - + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardStartedEditing:) name:UITextFieldTextDidBeginEditingNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWasDismissed:) name:UIKeyboardWillHideNotification object:nil]; + } } -- (void)keyboardWasDismissed:(NSNotification *)note { - - - if ([self doesAlertViewExist]) { - //alertViewExists therefore uitextfield will soon be released stop watching for events now to fix memory management bugs. - [self endWatchingForKeyboard]; +- (void)keyboardDidShow:(NSNotification *)note +{ + [self setKeyboardDidShow:TRUE]; + if ([[self assignedTextField] isFirstResponder] && [self newButton]) [self addButtonToKeyboard]; +} + +- (void)keyboardStartedEditing:(NSNotification *)note +{ + if ([[self assignedTextField] isFirstResponder]) { + if (([self withToggleButton] || [self withDoubleZerosButton]) && [self newButton] && [self keyboardDidShow]) [self addButtonToKeyboard]; + if ([[[self assignedTextField] text] length] == 0 && [[[self assignedTextField] delegate] isEqual:self]) { + [[self assignedTextField] setText:[[self formatter] stringFromNumber:[NSNumber numberWithFloat:0.0]]]; } - - self.newButton = TRUE; - self.keyboardDidShow = FALSE; - //NSLog(@"Button is gone"); - + if ([self withToggleButton]) { + [[self toggleButton] setHidden:NO]; + [[self toggleButton] setUserInteractionEnabled:YES]; + } else if ([self withDoubleZerosButton]) { + [[self doubleZerosButton] setHidden:NO]; + [[self doubleZerosButton] setUserInteractionEnabled:YES]; + } + } else { + if ([self withToggleButton]) { + [[self toggleButton] setHidden:YES]; + [[self toggleButton] setUserInteractionEnabled:NO]; + } else if ([self withDoubleZerosButton]) { + [[self doubleZerosButton] setHidden:YES]; + [[self doubleZerosButton] setUserInteractionEnabled:NO]; + } + } } --(void)endWatchingForKeyboard { - - //NSLog(@"end watching for keyboard"); - - [[NSNotificationCenter defaultCenter] removeObserver:self]; - +- (void)keyboardWasDismissed:(NSNotification *)note +{ + if ([self doesAlertViewExist]) [self endWatchingForKeyboard]; + + [self setNewButton:TRUE]; + if ([self withToggleButton] || [self withDoubleZerosButton]) [self setKeyboardDidShow:FALSE]; } -#pragma mark Private Methods +- (void)endWatchingForKeyboard +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} --(void)addButtonToKeyboard { - - //NSLog(@"add Button"); +#pragma mark Private Methods - //If a alertview is present with a textfield the viewIndex will be different than 1 - NSInteger viewIndex = 1; - - if ([self doesAlertViewExist]) { - viewIndex = 2; +- (void)addButtonToKeyboard +{ + NSInteger viewIndex = ([self doesAlertViewExist]) ? 2 : 1; + UIWindow* tempWindow = [[[UIApplication sharedApplication] windows] objectAtIndex:viewIndex]; + + for (UIView *keyboard in [tempWindow subviews]) { + if ([[keyboard description] hasPrefix:@" 0) { + [[[self assignedTextField] delegate] textField:[self assignedTextField] shouldChangeCharactersInRange:NSMakeRange(0, 1) replacementString:@"-"]; + } +} - - if ([self.assignedTextField.text length] > 0) { - - [self.assignedTextField.delegate textField:self.assignedTextField shouldChangeCharactersInRange:NSMakeRange(0, 1) replacementString:@"-"]; +- (void)doubleZerosButton:(id)sender +{ + if ([[[self assignedTextField] text] length] > 0) { + for (int i = 0; i < 2; i++) { + [[[self assignedTextField] delegate] textField:[self assignedTextField] shouldChangeCharactersInRange:NSMakeRange(-1, 1) replacementString:@"0"]; } + } } -- (BOOL) doesAlertViewExist { - - for (UIWindow* window in [UIApplication sharedApplication].windows) { - for (UIView* view in window.subviews) { - BOOL alert = [view isKindOfClass:[UIAlertView class]]; - BOOL action = [view isKindOfClass:[UIActionSheet class]]; - if (alert || action) - return YES; - } +- (BOOL)doesAlertViewExist +{ + for (UIWindow* window in [[UIApplication sharedApplication] windows]) { + for (UIView* view in [window subviews]) { + if ([view isKindOfClass:[UIAlertView class]] || [view isKindOfClass:[UIActionSheet class]]) return YES; } - return NO; + } + return NO; } -#pragma mark UITextField Delegate Methods +#pragma mark UITextFieldDelegate -- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { - - textField.text = [MSCurrencyFormatter formatTextField:textField withCharactersInRange:range withReplacementString:string]; - return NO; - +- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string +{ + [textField setText:[self formatTextField:textField withCharactersInRange:range withReplacementString:string]]; + return NO; } -#pragma mark Class Methods - -+(NSString *)formatTextField:(UITextField *)textField withCharactersInRange:(NSRange)range withReplacementString:(NSString *)string { - - //If user types a - just flip/flop to a negative or positive number. - if ([string hasSuffix:@"-"]) { - if ([[textField.text substringToIndex:1] isEqualToString:@"-"]) { - - return textField.text = [textField.text substringFromIndex:1]; - - } - - NSString *newString = @"-"; - return textField.text = [newString stringByAppendingString:textField.text]; - - } - - //This is for if we're removing the negative - if (range.location == 0 && range.length == 1 && [string isEqualToString:@""]) { - - return [textField.text substringFromIndex:1]; - - } - - NSInteger currencyScale; +- (NSString *)formatTextField:(UITextField *)textField withCharactersInRange:(NSRange)range withReplacementString:(NSString *)string +{ + NSString *minus = @"-"; - //setup formatter - NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init]; - [formatter setNumberStyle:NSNumberFormatterCurrencyStyle]; - currencyScale = -1 * [formatter maximumFractionDigits]; - - //First analyze string for numbers only. - NSMutableString *filteredString = [NSMutableString stringWithCapacity:textField.text.length]; - NSScanner *scanner = [NSScanner scannerWithString:textField.text]; - NSCharacterSet *allowedChars = [NSCharacterSet characterSetWithCharactersInString:@"0123456789"]; - - while ([scanner isAtEnd] == NO) { - NSString *buffer; - if ([scanner scanCharactersFromSet:allowedChars intoString:&buffer]) { - [filteredString appendString:buffer]; - } else { - [scanner setScanLocation:([scanner scanLocation] + 1)]; - } - } - - NSString *enteredDigits = filteredString; - - - // Next Check if it is negative and remember that. - BOOL isNegative = FALSE; - - if ([[textField.text substringToIndex:1] isEqualToString:@"-"]) { - - isNegative = TRUE; - - } - - - //only allow numbers to be entered via keypad/keyboard - NSCharacterSet *myCharSet = [NSCharacterSet characterSetWithCharactersInString:@"0123456789"]; - for (int i = 0; i < [string length]; i++) { - unichar c = [string characterAtIndex:i]; - if (![myCharSet characterIsMember:c]) { - - return textField.text; - } + if ([string hasSuffix:minus]) { + if ([[[textField text] substringToIndex:1] isEqualToString:minus]) { + return textField.text = [[textField text] substringFromIndex:1]; } - - // Check the length of the string - if ([string length]) { - if ([enteredDigits length] > 10) { - //This makes sure that we don't have a long price. - - return textField.text; - } else { - - enteredDigits = [enteredDigits stringByAppendingFormat:@"%d", [string integerValue]]; - - } + return textField.text = [minus stringByAppendingString:[textField text]]; + } + if (range.location == 0 && range.length == 1 && [string isEqualToString:@""]) { + return [[textField text] substringFromIndex:1]; + } + + NSInteger currencyScale = -1 * [[self formatter] maximumFractionDigits]; + NSMutableString *filteredString = [NSMutableString stringWithCapacity:[[textField text] length]]; + NSScanner *scanner = [NSScanner scannerWithString:[textField text]]; + NSCharacterSet *allowedChars = [NSCharacterSet characterSetWithCharactersInString:@"0123456789"]; + + while ([scanner isAtEnd] == NO) { + NSString *buffer; + if ([scanner scanCharactersFromSet:allowedChars intoString:&buffer]) { + [filteredString appendString:buffer]; } else { - - // This is a backspace - NSUInteger len = [enteredDigits length]; - if (len > 1) { - - enteredDigits = [enteredDigits substringWithRange:NSMakeRange(0, len - 1)]; - } else { - - enteredDigits = @""; - } + [scanner setScanLocation:([scanner scanLocation] + 1)]; } - - NSDecimalNumber *decimal = nil; - - if ( ![enteredDigits isEqualToString:@""]) { - decimal = [[NSDecimalNumber decimalNumberWithString:enteredDigits] decimalNumberByMultiplyingByPowerOf10:currencyScale]; + } + + NSString *enteredDigits = filteredString; + BOOL isNegative = [[[textField text] substringToIndex:1] isEqualToString:minus]; + + NSCharacterSet *myCharSet = [NSCharacterSet characterSetWithCharactersInString:@"0123456789"]; + for (int i = 0; i < [string length]; i++) { + if (![myCharSet characterIsMember:[string characterAtIndex:i]]) return [textField text]; + } + + if ([string length]) { + if ([enteredDigits length] > 10) { + return [textField text]; } else { - decimal = [NSDecimalNumber zero]; + enteredDigits = [enteredDigits stringByAppendingFormat:@"%d", [string integerValue]]; } - - // Replace the text with the localized decimal number - - NSString *results = @""; - - if (isNegative) { - results = [NSString stringWithFormat:@"-%@",[formatter stringFromNumber:decimal]]; + } else { + NSUInteger len = [enteredDigits length]; + if (len > 1) { + enteredDigits = [enteredDigits substringWithRange:NSMakeRange(0, len - 1)]; } else { - results = [formatter stringFromNumber:decimal]; + enteredDigits = @""; } + } + + NSDecimalNumber *decimal = nil; - return results; + if (![enteredDigits isEqualToString:@""]) { + decimal = [[NSDecimalNumber decimalNumberWithString:enteredDigits] decimalNumberByMultiplyingByPowerOf10:currencyScale]; + } else { + decimal = [NSDecimalNumber zero]; + } + + NSString *results = @""; + if (isNegative) { + results = [NSString stringWithFormat:@"-%@",[[self formatter] stringFromNumber:decimal]]; + } else { + results = [[self formatter] stringFromNumber:decimal]; + } + return results; } -+(NSDecimalNumber *)decimalNumberFromFormattedString:(NSString *)string { - - NSMutableString *strippedString = [NSMutableString stringWithCapacity:string.length]; - - NSScanner *scanner = [NSScanner scannerWithString:string]; - NSCharacterSet *numbers = [NSCharacterSet - characterSetWithCharactersInString:@"0123456789.-"]; - - while ([scanner isAtEnd] == NO) { - NSString *buffer; - if ([scanner scanCharactersFromSet:numbers intoString:&buffer]) { - [strippedString appendString:buffer]; - - } else { - [scanner setScanLocation:([scanner scanLocation] + 1)]; - } +- (BOOL)textFieldShouldReturn:(UITextField *)textField +{ + [textField resignFirstResponder]; + return YES; +} + +- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField +{ + if ((void (^)(void))self.textFieldShouldBeginEditingBlock) { + self.textFieldShouldBeginEditingBlock(textField); + } + return YES; +} + +- (void)textFieldDidBeginEditing:(UITextField *)textField +{ + if ((void (^)(void))self.textFieldDidBeginEditingBlock) { + self.textFieldDidBeginEditingBlock(textField); + } +} + +- (BOOL)textFieldShouldEndEditing:(UITextField *)textField +{ + if ((void (^)(void))self.textFieldShouldEndEditingBlock) { + self.textFieldShouldEndEditingBlock(textField); + } + return YES; +} + +- (void)textFieldDidEndEditing:(UITextField *)textField +{ + if ((void (^)(void))self.textFieldDidEndEditingBlock) { + self.textFieldDidEndEditingBlock(textField); + } +} + +#pragma mark Class Methods + ++ (NSDecimalNumber *)decimalNumberFromFormattedString:(NSString *)string +{ + NSMutableString *strippedString = [NSMutableString stringWithCapacity:[string length]]; + NSScanner *scanner = [NSScanner scannerWithString:string]; + NSCharacterSet *numbers = [NSCharacterSet characterSetWithCharactersInString:@"0123456789.-"]; + + while ([scanner isAtEnd] == NO) { + NSString *buffer; + if ([scanner scanCharactersFromSet:numbers intoString:&buffer]) { + [strippedString appendString:buffer]; + } else { + [scanner setScanLocation:([scanner scanLocation] + 1)]; } - - return [NSDecimalNumber decimalNumberWithString:strippedString]; - + } + + return [NSDecimalNumber decimalNumberWithString:strippedString]; } - -@end +@end \ No newline at end of file diff --git a/MSCurrencyFormatter.podspec b/MSCurrencyFormatter.podspec new file mode 100644 index 0000000..d62f473 --- /dev/null +++ b/MSCurrencyFormatter.podspec @@ -0,0 +1,13 @@ +Pod::Spec.new do |s| + s.name = "MSCurrencyFormatter" + s.version = "0.0.4" + s.summary = "A piece of code that will automatically format a UITextField with a numberpad to behave like an ATM." + s.homepage = "https://github.com/unteleported/MSCurrencyFormatter" + s.license = 'MIT' + s.authors = { "Brandon Butler" => "", "Olexandr Skrypnyk" => "sxua@unteleported.com" } + s.source = { :git => "https://github.com/unteleported/MSCurrencyFormatter.git", :tag => "0.0.4" } + s.platform = :ios, '5.0' + s.source_files = 'MSCurrencyFormatter.{h,m}' + s.resources = "{toggle,doubleZeros}Button{Down,Up}.png" + s.requires_arc = true +end diff --git a/doubleZerosButtonDown.png b/doubleZerosButtonDown.png new file mode 100644 index 0000000..8f478f8 Binary files /dev/null and b/doubleZerosButtonDown.png differ diff --git a/doubleZerosButtonUp.png b/doubleZerosButtonUp.png new file mode 100644 index 0000000..4754642 Binary files /dev/null and b/doubleZerosButtonUp.png differ diff --git a/toggleButtonDown.png b/toggleButtonDown.png index 1c1e454..e753265 100644 Binary files a/toggleButtonDown.png and b/toggleButtonDown.png differ diff --git a/toggleButtonUp.png b/toggleButtonUp.png index 2674af9..47b9c78 100644 Binary files a/toggleButtonUp.png and b/toggleButtonUp.png differ