我是iPhone iOS開發新手。我不能解僱鍵盤,沒有任何工作。請幫助我,也許我沒有注意到任何東西?不能關閉鍵盤iOS。沒有什麼作品
我.h文件中:
#import "UIKit/UIKit.h"
@interface ViewController : UIViewController <UITextViewDelegate>
@property (weak, nonatomic) IBOutlet UITextField *textField;
@end
我.m文件:
#import "ViewController.h"
#import "UIKit/UIKit.h"
@interface ViewController()
@end
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
-(BOOL) textFieldShouldReturn: (UITextField *) textField{
[textField resignFirstResponder];
return YES;
}
@end
對不起,當我一直在寫代碼時,不小心按下了輸入,請等待一分鐘,我會在這裏複製我的代碼。 – 2013-02-24 07:34:43