From 9e8903402b12a0b790223aa86e60c0dde304d268 Mon Sep 17 00:00:00 2001 From: Diego Waxemberg Date: Mon, 20 Oct 2014 21:45:37 -0400 Subject: [PATCH] now hide keyboard when enter is pressed --- Limelight/MainFrameViewController.h | 2 +- Limelight/MainFrameViewController.m | 9 +++++++++ MainFrame-iPad.storyboard | 3 +++ MainFrame-iPhone.storyboard | 3 +++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Limelight/MainFrameViewController.h b/Limelight/MainFrameViewController.h index c178a73..d4777f9 100644 --- a/Limelight/MainFrameViewController.h +++ b/Limelight/MainFrameViewController.h @@ -11,7 +11,7 @@ #import "PairManager.h" #import "StreamConfiguration.h" -@interface MainFrameViewController : UIViewController +@interface MainFrameViewController : UIViewController @property (strong, nonatomic) IBOutlet UIPickerView *HostPicker; - (IBAction)StreamButton:(UIButton *)sender; - (IBAction)PairButton:(UIButton *)sender; diff --git a/Limelight/MainFrameViewController.m b/Limelight/MainFrameViewController.m index 2d25685..17918f8 100644 --- a/Limelight/MainFrameViewController.m +++ b/Limelight/MainFrameViewController.m @@ -174,6 +174,15 @@ static StreamConfiguration* streamConfig; // Dispose of any resources that can be recreated. } +- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { + [self.view endEditing:YES]; +} + +- (BOOL)textFieldShouldReturn:(UITextField *)textField { + [textField resignFirstResponder]; + return YES; +} + - (BOOL)shouldAutorotate { return YES; } diff --git a/MainFrame-iPad.storyboard b/MainFrame-iPad.storyboard index 18c5087..cbe41c1 100644 --- a/MainFrame-iPad.storyboard +++ b/MainFrame-iPad.storyboard @@ -54,6 +54,9 @@ + + + diff --git a/MainFrame-iPhone.storyboard b/MainFrame-iPhone.storyboard index f21e6c6..e1c21c1 100644 --- a/MainFrame-iPhone.storyboard +++ b/MainFrame-iPhone.storyboard @@ -48,6 +48,9 @@ + + +