-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework text field deletions (big thanks to @kilink!)
* Adds several integration (UI) tests * closes #8
- Loading branch information
Showing
12 changed files
with
234 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ profile | |
*.moved-aside | ||
DerivedData | ||
.idea/ | ||
Pods/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
platform :ios, '6.0' | ||
|
||
target 'RMSTokenViewTests', :exclusive => true do | ||
pod 'KIF', '~> 3.0' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
PODS: | ||
- KIF (3.0.3): | ||
- KIF/XCTest | ||
- KIF/XCTest (3.0.3) | ||
|
||
DEPENDENCIES: | ||
- KIF (~> 3.0) | ||
|
||
SPEC CHECKSUMS: | ||
KIF: 908d9a64faa939ad96581c90f9cc256649a2014a | ||
|
||
COCOAPODS: 0.32.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// RMSTextField.h | ||
// RMSTokenView | ||
// | ||
// Created by Patrick Strawderman on 5/5/14. | ||
// Copyright (c) 2014 RoleModel Software. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@protocol BackspaceDelegate <NSObject> | ||
|
||
@optional | ||
- (void)willDeleteBackward:(UITextField*)textField; | ||
- (void)didDeleteBackward:(UITextField*)textField; | ||
|
||
@end | ||
|
||
|
||
@interface RMSTextField : UITextField | ||
@property (nonatomic, weak) id<BackspaceDelegate>backspaceDelegate; | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// RMSTextField.m | ||
// RMSTokenView | ||
// | ||
// Created by Patrick Strawderman on 5/5/14. | ||
// Copyright (c) 2014 RoleModel Software. All rights reserved. | ||
// | ||
|
||
#import "RMSTextField.h" | ||
|
||
@implementation RMSTextField | ||
|
||
- (void)deleteBackward { | ||
if ([self.backspaceDelegate respondsToSelector:@selector(willDeleteBackward:)]) { | ||
[self.backspaceDelegate willDeleteBackward:self]; | ||
} | ||
[super deleteBackward]; | ||
if ([self.backspaceDelegate respondsToSelector:@selector(didDeleteBackward:)]) { | ||
[self.backspaceDelegate didDeleteBackward:self]; | ||
} | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.