Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Conflicts:
	Classes/CDIEditTaskViewController.m
  • Loading branch information
soffes committed Oct 1, 2012
2 parents f71f055 + 4f56407 commit ca45054
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Classes/CDIAddTaskView.m
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ - (id)initWithFrame:(CGRect)frame {
_textField.font = [UIFont cheddarFontOfSize:18.0f];

CDIKeyboardBar *keyboardBar = [[CDIKeyboardBar alloc] initWithFrame:CGRectMake(0.0f, 0.0f, size.width, UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ? 54.0f : 36.0f)];
keyboardBar.textField = _textField;
keyboardBar.keyInputView = _textField;
_textField.inputAccessoryView = keyboardBar;
[self addSubview:_textField];

Expand Down
5 changes: 5 additions & 0 deletions Classes/CDIEditTaskViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#import "CDIEditTaskViewController.h"
#import "CDIMoveTaskView.h"
#import "CDIKeyboardBar.h"
#import "UIColor+CheddariOSAdditions.h"
#import "UIFont+CheddariOSAdditions.h"

Expand Down Expand Up @@ -54,6 +55,10 @@ - (void)viewDidLoad {
_textView.returnKeyType = UIReturnKeyGo;
_textView.font = [UIFont cheddarFontOfSize:18.0f];
_textView.text = self.task.text;

CDIKeyboardBar *keyboardBar = [[CDIKeyboardBar alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.view.bounds.size.width, UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ? 54.0f : 36.0f)];
keyboardBar.keyInputView = _textView;
_textView.inputAccessoryView = keyboardBar;
[self.view addSubview:_textView];

_moveTaskView = [[CDIMoveTaskView alloc] init];
Expand Down
2 changes: 1 addition & 1 deletion Classes/CDIKeyboardBar.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

@interface CDIKeyboardBar : SSGradientView <UIInputViewAudioFeedback>

@property (nonatomic, weak) UITextField *textField;
@property (nonatomic, weak) id<UIKeyInput> keyInputView;

+ (NSArray *)characters;

Expand Down
6 changes: 3 additions & 3 deletions Classes/CDIKeyboardBar.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ @implementation CDIKeyboardBar {
NSArray *_buttons;
}

@synthesize textField = _textField;
@synthesize keyInputView = _keyInputView;

#pragma mark - Class Methods

+ (NSArray *)characters {
return @[@"#", @"*", @"_", @"[", @"]", @"(", @")"];
return @[@"#", @"*", @"_", @"[", @"]", @"(", @")", @"`"];
}


Expand Down Expand Up @@ -89,7 +89,7 @@ - (BOOL)enableInputClicksWhenVisible {

- (void)_buttonPressed:(CDIKeyboardButton *)button {
[[UIDevice currentDevice] playInputClick];
[self.textField insertText:button.character];
[self.keyInputView insertText:button.character];
}

@end
2 changes: 2 additions & 0 deletions Classes/CDIKeyboardButton.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ @implementation CDIKeyboardButton

- (id)initWithCharacter:(NSString *)character {
if ((self = [super init])) {
self.contentMode = UIViewContentModeRedraw;

_character = character;

[self setTitle:character forState:UIControlStateNormal];
Expand Down
2 changes: 1 addition & 1 deletion Resources/Cheddar-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</dict>
</dict>
<key>CFBundleIdentifier</key>
<string>com.nothingmagical.cheddar-ios</string>
<string>com.nothingmagical.cheddar-ios.dev</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down

0 comments on commit ca45054

Please sign in to comment.