I have UIViewController with UITextField in it.
#import <UIKit/UIKit.h>
@interface TextMemoViewController : UIViewController<UITextFieldDelegate>
@property (unsafe_unretained, nonatomic) IBOutlet UITextField *textMemo;
@end
In implementation code is next:
#import "TextMemoViewController.h"
@implementation TextMemoViewController
@synthesize textMemo;
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
self.textMemo.delegate = self;
}
//.....
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField {
return YES;
}
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
[textField resignFirstResponder];
return YES;
}
The problem is, when i click on textField - keyboard appears, but nothing can be pressed on it. All Simulator hangs up. Text input is not possible with this behavior.
I have couple of some UIViewControllers with textFields and all is ok. But here, i can not find the reason why it happens. I have cleaned DerivedData in Xcode, restarted all simulators and reset setting for them. Same situation on iphone. Does anyone has ideas?
A better late, than never :)
Thanks all, but as i found a long time ago, the problem was in NOT resigned responder in some previous views. In this case, view was covered by other one, but responder was not changed.
Maybe someone will find this useful.