Skip to content

Commit

Permalink
Adds the markdown keyboard accessory when editing a task.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasgomollon committed Sep 30, 2012
1 parent 9199915 commit 94c8275
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Classes/CDIRenameTaskViewController.m
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@
//

#import "CDIRenameTaskViewController.h"
#import "CDIKeyboardBar.h"
#import "UIColor+CheddariOSAdditions.h"
#import "UIFont+CheddariOSAdditions.h"

@@ -52,6 +53,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.textField = _textView;
_textView.inputAccessoryView = keyboardBar;
[self.view addSubview:_textView];

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_keyboardDidShow:) name:UIKeyboardDidShowNotification object:nil];

0 comments on commit 94c8275

Please sign in to comment.