mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-04-13 11:26:05 +00:00
now hide keyboard when enter is pressed
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
#import "PairManager.h"
|
||||
#import "StreamConfiguration.h"
|
||||
|
||||
@interface MainFrameViewController : UIViewController <UIPickerViewDataSource, UIPickerViewDelegate, MDNSCallback, NSURLConnectionDelegate, PairCallback>
|
||||
@interface MainFrameViewController : UIViewController <UIPickerViewDataSource, UIPickerViewDelegate, MDNSCallback, NSURLConnectionDelegate, PairCallback, UITextFieldDelegate>
|
||||
@property (strong, nonatomic) IBOutlet UIPickerView *HostPicker;
|
||||
- (IBAction)StreamButton:(UIButton *)sender;
|
||||
- (IBAction)PairButton:(UIButton *)sender;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -54,6 +54,9 @@
|
||||
<rect key="frame" x="374" y="235" width="276" height="30"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="wb7-af-jn8" id="YMu-2k-Dyk"/>
|
||||
</connections>
|
||||
</textField>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
|
||||
@@ -48,6 +48,9 @@
|
||||
<rect key="frame" x="82" y="179" width="156" height="30"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="dgh-JZ-Q7z" id="DCy-4m-RHG"/>
|
||||
</connections>
|
||||
</textField>
|
||||
<pickerView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0xb-lk-PHK">
|
||||
<rect key="frame" x="0.0" y="307" width="320" height="162"/>
|
||||
|
||||
Reference in New Issue
Block a user