Skip to content
Browse files

Show the input buttons only when focussed.

  • Loading branch information...
1 parent 9fbb5a1 commit 321dc79f882b527804bea27cbef7b2a84f0538e1 Andrew Plotkin committed Apr 18, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 AppSrc/CmdTextField.m
View
5 AppSrc/CmdTextField.m
@@ -41,19 +41,19 @@ - (BOOL) becomeFirstResponder {
if (!res)
return NO;
+ rightsideview.hidden = NO;
[[IosGlkViewController singleton] preferInputWindow:wintag];
return YES;
}
-/*
- (BOOL) resignFirstResponder {
BOOL res = [super resignFirstResponder];
if (!res)
return NO;
+ rightsideview.hidden = YES;
return YES;
}
- */
- (void) setUpForWindow:(GlkWindowView *)winv singleChar:(BOOL)singleval {
GlkWindowState *win = winv.winstate;
@@ -81,6 +81,7 @@ - (void) setUpForWindow:(GlkWindowView *)winv singleChar:(BOOL)singleval {
img = [clearbutton backgroundImageForState:UIControlStateNormal];
img = [img stretchableImageWithLeftCapWidth:img.size.width/2 topCapHeight:img.size.height/2];
[clearbutton setBackgroundImage:img forState:UIControlStateNormal];
+ rightsideview.hidden = ![self isFirstResponder];
//self.clearButtonMode = UITextFieldViewModeWhileEditing;
self.rightViewMode = UITextFieldViewModeAlways;

0 comments on commit 321dc79

Please sign in to comment.
Something went wrong with that request. Please try again.